Changeset: 97fb2ac09909 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/97fb2ac09909
Modified Files:
        sql/server/rel_exp.c
Branch: antipush
Log Message:

Update expression match conditions


diffs (43 lines):

diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -1317,24 +1317,21 @@ exp_match_exp( sql_exp *e1, sql_exp *e2)
                return 1;
        if (is_ascending(e1) != is_ascending(e2) || nulls_last(e1) != 
nulls_last(e2) || zero_if_empty(e1) != zero_if_empty(e2) ||
                need_no_nil(e1) != need_no_nil(e2) || is_anti(e1) != 
is_anti(e2) || is_semantics(e1) != is_semantics(e2) ||
-               is_symmetric(e1) != is_symmetric(e2) || need_distinct(e1) != 
need_distinct(e2))
+               is_symmetric(e1) != is_symmetric(e2) || is_unique(e1) != 
is_unique(e2) || need_distinct(e1) != need_distinct(e2))
                return 0;
        if (e1->type == e2->type) {
                switch(e1->type) {
                case e_cmp:
                        if (e1->flag == e2->flag && !is_complex_exp(e1->flag) &&
-                           exp_match_exp(e1->l, e2->l) &&
-                           exp_match_exp(e1->r, e2->r) &&
+                           exp_match_exp(e1->l, e2->l) && exp_match_exp(e1->r, 
e2->r) &&
                            ((!e1->f && !e2->f) || (e1->f && e2->f && 
exp_match_exp(e1->f, e2->f))))
                                return 1;
                        else if (e1->flag == e2->flag && e1->flag == cmp_or &&
-                           exp_match_list(e1->l, e2->l) &&
-                           exp_match_list(e1->r, e2->r))
+                           exp_match_list(e1->l, e2->l) && 
exp_match_list(e1->r, e2->r))
                                return 1;
                        else if (e1->flag == e2->flag &&
                                (e1->flag == cmp_in || e1->flag == cmp_notin) &&
-                           exp_match_exp(e1->l, e2->l) &&
-                           exp_match_list(e1->r, e2->r))
+                           exp_match_exp(e1->l, e2->l) && 
exp_match_list(e1->r, e2->r))
                                return 1;
                        else if (e1->flag == e2->flag && (e1->flag == cmp_equal 
|| e1->flag == cmp_notequal) &&
                                exp_match_exp(e1->l, e2->r) && 
exp_match_exp(e1->r, e2->l))
@@ -1348,9 +1345,7 @@ exp_match_exp( sql_exp *e1, sql_exp *e2)
                        break;
                case e_aggr:
                        if (!subfunc_cmp(e1->f, e2->f) && /* equal aggregation*/
-                           exps_equal(e1->l, e2->l) &&
-                           need_distinct(e1) == need_distinct(e2) &&
-                           need_no_nil(e1) == need_no_nil(e2))
+                           exps_equal(e1->l, e2->l))
                                return 1;
                        break;
                case e_func: {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to