maybe we could also support FIRST() and LAST()
https://www.monetdb.org/bugzilla/show_bug.cgi?id=6333
On Wed, Jul 12, 2017 at 11:22 AM, Martin Kersten
Changeset: 718758b70621 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=718758b70621 Modified Files: sql/server/sql_parser.y Branch: default Log Message:
Support LIMIT in scalar expressions Picking a single element from a table is now supported using LIMIT (and SAMPLE) in SET and UPDATE subqueries
set v =(select * from tbl limit 1);
diffs (21 lines):
diff --git a/sql/server/sql_parser.y b/sql/server/sql_parser.y --- a/sql/server/sql_parser.y +++ b/sql/server/sql_parser.y @@ -772,7 +772,7 @@ set_statement: append_string(l, $2 ); append_symbol(l, $4 ); $$ = _symbol_create_list( SQL_SET, l); } - | set column_commalist_parens '=' subquery + | set column_commalist_parens '=' subquery_with_orderby { dlist *l = L(); append_list(l, $2); append_symbol(l, $4); @@ -2919,7 +2919,7 @@ assignment: append_symbol(l, $3 ); append_string(l, $1); $$ = _symbol_create_list( SQL_ASSIGN, l); } - | column_commalist_parens '=' subquery + | column_commalist_parens '=' subquery_with_orderby { dlist *l = L(); append_symbol(l, $3); append_list(l, $1); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list