Changeset: e35593531702 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e35593531702
Modified Files:
        sql/server/sql_parser.y
        sql/test/sciql/Tests/sciql03.sql
Branch: sciql
Log Message:

small fixes for sciql in the sql_parser:

- we don't allow 'dimension[]'. it should be either 'dimension' or 
'dimension[*]'
- use the list 'l' (i.s.o. '$3') for the structure based group by without 
distinct; then
- we need to add back the rule for normal SQL_GROUPBY
- cosmetics


diffs (59 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
@@ -1476,7 +1476,7 @@
                        { $$ = append_symbol($1, $3 ); }
  ;
 
-column_option: default | column_constraint | generated_column ;
+column_option: default | column_constraint | generated_column;
 
 default:
     DEFAULT default_value { $$ = _symbol_create_symbol(SQL_DEFAULT, $2); }
@@ -1604,12 +1604,7 @@
                dlist *l = L();
                $$= l;
        }
-       | '[' ']'
-       {
-               dlist *l = L();
-               $$= l;
-       }
-       | '[' dim_exp ']'
+       | '[' dim_exp ']' /* size of INT dim or '*' */
        {
                dlist *l = L();
                $$= l;
@@ -3057,11 +3052,12 @@
 
 opt_group_by_clause:
     /* empty */                  { $$ = NULL; }
+ |  sqlGROUP BY column_ref_commalist { $$ = _symbol_create_list( SQL_GROUPBY, 
$3 );}
  |  sqlGROUP BY group_ref_commalist { 
        dlist *l = L();
        l= append_list(l,$3);
        l= append_int(l,0);
-       $$ = _symbol_create_list( SQL_GROUPBY, $3 );}
+       $$ = _symbol_create_list( SQL_GROUPBY, l );}
  |  sqlGROUP BY DISTINCT group_ref_commalist {
        dlist *l = L();
        l= append_list(l,$4);
@@ -3440,7 +3436,7 @@
  |  XML_value_function
  |  param
  |  array_element 
- | ARRAY '(' scalar_exp_list ')' {
+ |  ARRAY '(' scalar_exp_list ')' {
        dlist *l = L();
        l = append_list(l,$3);
        $$ = _symbol_create_list( SQL_ARRAY, l);
diff --git a/sql/test/sciql/Tests/sciql03.sql b/sql/test/sciql/Tests/sciql03.sql
--- a/sql/test/sciql/Tests/sciql03.sql
+++ b/sql/test/sciql/Tests/sciql03.sql
@@ -9,4 +9,5 @@
 
 -- not in the paper
 UPDATE stripes SET x = x+1;  -- what does it mean
-                                                       -- consider stripes 
with free dimensions too
+                             -- consider stripes with free dimensions too
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to