Skip to content

Commit ccd3f68

Browse files
authored
Add schema to functions (#259)
1 parent 0ede821 commit ccd3f68

File tree

8 files changed

+3472
-4213
lines changed

8 files changed

+3472
-4213
lines changed

src/parser/bison_parser.cpp

Lines changed: 2960 additions & 3119 deletions
Large diffs are not rendered by default.

src/parser/bison_parser.h

Lines changed: 189 additions & 200 deletions
Large diffs are not rendered by default.

src/parser/bison_parser.y

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,9 @@ comp_expr : operand '=' operand { $$ = Expr::makeOpBinary($1, kOpEquals, $3); }
11711171
// `function_expr is used for window functions, aggregate expressions, and functions calls because we run into shift/
11721172
// reduce conflicts when splitting them.
11731173
function_expr : IDENTIFIER '(' ')' opt_window { $$ = Expr::makeFunctionRef($1, new std::vector<Expr*>(), false, $4); }
1174-
| IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($1, $4, $3, $6); };
1174+
| IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($1, $4, $3, $6); }
1175+
| IDENTIFIER '.' IDENTIFIER '(' ')' opt_window { $$ = Expr::makeFunctionRef($3, $1, new std::vector<Expr*>(), false, $6); }
1176+
| IDENTIFIER '.' IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($3, $1, $6, $5, $8); };
11751177

11761178
// Window function expressions, based on https://www.postgresql.org/docs/15/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
11771179
// We do not support named windows, collations and exclusions (for simplicity) and filters (not part of the SQL standard).

0 commit comments

Comments
 (0)