Changeset: 5aff29a383c1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5aff29a383c1
Modified Files:
        sql/server/sql_parser.y
Branch: RIntegration
Log Message:

added parser side of aggregate + language implementations. Some examples are 
now needed to finish the implemenation.


diffs (35 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
@@ -1860,6 +1860,31 @@ func_def:
                                append_int(f, F_AGGR);
                                append_int(f, FUNC_LANG_MAL);
                          $$ = _symbol_create_list( SQL_CREATE_FUNC, f ); }
+  | create AGGREGATE qname
+       '(' opt_paramlist ')'
+    RETURNS func_data_type
+    LANGUAGE IDENT X_BODY { 
+                       int lang = 0;
+                       dlist *f = L();
+                       char l = *$10;
+
+                       if (l == 'R' || l == 'r')
+                               lang = FUNC_LANG_R;
+                       else if (l == 'C' || l == 'c')
+                               lang = FUNC_LANG_C;
+                       else if (l == 'J' || l == 'j')
+                               lang = FUNC_LANG_J;
+                       else
+                               yyerror(m, sql_message("Language name R, C, or 
J(avascript):expected, received '%c'", l));
+
+                       append_list(f, $3);
+                       append_list(f, $5);
+                       append_symbol(f, $8);
+                       append_list(f, NULL);
+                       append_list(f, append_string(L(), $11));
+                       append_int(f, F_AGGR);
+                       append_int(f, lang);
+                       $$ = _symbol_create_list( SQL_CREATE_FUNC, f ); }
  | /* proc ie no result */
     create PROCEDURE qname
        '(' opt_paramlist ')'
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to