MonetDB: default - Support LIMIT in scalar expressions

Lefteris lsidir at gmail.com
Wed Jul 12 11:31:44 CEST 2017


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
<commits+mk=cwi.nl at monetdb.org> wrote:
> 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 at monetdb.org
> https://www.monetdb.org/mailman/listinfo/checkin-list


More information about the developers-list mailing list