Changeset: 7027e978c6df for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7027e978c6df
Modified Files:
        sql/server/rel_dump.c
Branch: window-tunning
Log Message:

Hack to make window functions work on remote plans, remove up to 4 added 
parameters


diffs (27 lines):

diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -1065,10 +1065,21 @@ exp_read(mvc *sql, sql_rel *lrel, sql_re
                        f = sql_bind_func_(sql->sa, s, cname, ops, F_FUNC);
                        if (!f)
                                f = sql_bind_func_(sql->sa, s, cname, ops, 
F_ANALYTIC);
-                       if (!f && list_length(ops) > 1) {
-                               list_remove_node(ops, ops->t);
+                       if (!f && nops > 1) {
                                list_remove_node(ops, ops->t); /* some window 
functions require don't include the bounds on their definition, ugh */
                                f = sql_bind_func_(sql->sa, s, cname, ops, 
F_ANALYTIC);
+                               if (!f && nops > 2) {
+                                       list_remove_node(ops, ops->t);
+                                       f = sql_bind_func_(sql->sa, s, cname, 
ops, F_ANALYTIC);
+                                       if (!f && nops > 3) {
+                                               list_remove_node(ops, ops->t);
+                                               f = sql_bind_func_(sql->sa, s, 
cname, ops, F_ANALYTIC);
+                                               if (!f && nops > 4) {
+                                                       list_remove_node(ops, 
ops->t);
+                                                       f = 
sql_bind_func_(sql->sa, s, cname, ops, F_ANALYTIC);
+                                               }
+                                       }
+                               }
                        }
 
                        /* fix scale of mul function, other type casts are 
explicit */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to