Changeset: dc60f6d690da for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dc60f6d690da
Modified Files:
        sql/backends/monet5/rel_bin.c
        sql/include/sql_relation.h
        sql/server/rel_optimizer.c
        sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out
        
sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out.Windows
        sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test
        sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test
        
sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test
        sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.test
        sql/test/BugTracker-2013/Tests/rangejoin_optimizer.Bug-3411.test
        sql/test/BugTracker-2015/Tests/crash.Bug-3736.test
        sql/test/BugTracker-2015/Tests/crash_in_reduce_groupby.Bug-3818.test
        sql/test/BugTracker-2015/Tests/large_join.Bug-3809.test
        
sql/test/BugTracker-2015/Tests/quantile_function_resolution.Bug-3773.test
        sql/test/BugTracker-2015/Tests/schema_view.Bug-3708.test
        
sql/test/BugTracker-2016/Tests/memory-consumption-query-PLAN-25joins.Bug-3972.test
        sql/test/BugTracker-2016/Tests/merge_project.Bug-3955.test
        sql/test/BugTracker-2017/Tests/caching_stats_bug.6374.test
        
sql/test/BugTracker-2017/Tests/sqlitelogictest-aggregation-having-avg.Bug-6428.test
        
sql/test/BugTracker-2018/Tests/count_from_commented_function_signatures.Bug-6542.test
        sql/test/BugTracker-2021/Tests/plan-not-optimal-view.Bug-7140.test
        sql/test/BugTracker/Tests/jdbc_no_debug.SF-1739356.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-0join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-0join-view.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-1join-view.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-query.test
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-plan-2join-view.test
        sql/test/SQLancer/Tests/sqlancer10.test
        sql/test/Tests/keys.test
        sql/test/Tests/order_by_complex_exp.test
        sql/test/Tests/truncate-statements-extra.test
        sql/test/analytics/Tests/analytics00.test
        sql/test/astro/Tests/astro.test
        sql/test/bugs/Tests/rtrim_bug.test
        sql/test/merge-partitions/Tests/mergepart31.test
        sql/test/mergetables/Tests/mergequery.test
        sql/test/mergetables/Tests/part-elim.test
        sql/test/miscellaneous/Tests/groupby_error.test
        sql/test/miscellaneous/Tests/groupby_expressions.test
        sql/test/miscellaneous/Tests/simple_plans.test
        sql/test/out2in/Tests/out2in.test
Branch: default
Log Message:

Cleaning unused properties


diffs (truncated from 2841 to 300 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -25,8 +25,6 @@
 #include "mal_builder.h"
 #include "opt_prelude.h"
 
-#define OUTER_ZERO 64
-
 static stmt * exp_bin(backend *be, sql_exp *e, stmt *left, stmt *right, stmt 
*grp, stmt *ext, stmt *cnt, stmt *sel, int depth, int reduce, int push);
 static stmt * rel_bin(backend *be, sql_rel *rel);
 static stmt * subrel_bin(backend *be, sql_rel *rel, list *refs);
diff --git a/sql/include/sql_relation.h b/sql/include/sql_relation.h
--- a/sql/include/sql_relation.h
+++ b/sql/include/sql_relation.h
@@ -78,6 +78,7 @@ typedef struct expression {
 #define LEFT_JOIN              4
 #define REL_PARTITION          8
 #define MERGE_LEFT             16 /* used by merge statements */
+#define OUTER_ZERO             32
 
 /* We need bit wise exclusive numbers as we merge the level also in the flag */
 #define PSM_SET 1
diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -299,8 +299,6 @@ rel_properties(mvc *sql, global_props *g
        switch (rel->op) {
        case op_basetable:
        case op_table: {
-               if (!find_prop(rel->p, PROP_COUNT))
-                       rel->p = prop_create(sql->sa, PROP_COUNT, rel->p);
                if (is_basetable(rel->op)) {
                        sql_table *t = (sql_table *) rel->l;
                        sql_part *pt;
@@ -4301,8 +4299,6 @@ rel_push_aggr_down(visitor *v, sql_rel *
                                set_has_nil(e);
                                e = exp_ref(v->sql, e);
                                ne = exp_aggr1(v->sql->sa, e, a, 
need_distinct(e), 1, e->card, 1);
-                               if (/* DISABLES CODE */ (0) && cnt)
-                                       ne->p = prop_create(v->sql->sa, 
PROP_COUNT, ne->p);
                        } else {
                                ne = exp_copy(v->sql, oa);
                        }
diff --git 
a/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out 
b/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out
--- a/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out
+++ b/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out
@@ -3,15 +3,15 @@
 % clob # type
 % 193 # length
 insert(
-| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ] COUNT 
+| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ]
 | union (
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "/file1", bigint "-1", bigint "0", int 
"0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ],
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "/file2", bigint "-1", bigint "0", int 
"0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ]
 | ) [ int "NULL" ]
 )
diff --git 
a/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out.Windows
 
b/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out.Windows
--- 
a/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out.Windows
+++ 
b/sql/test/BugTracker-2009/Tests/copy_multiple_files.SF-2902320.stable.out.Windows
@@ -5,15 +5,15 @@
 % clob # type
 % 194 # length
 insert(
-| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ] COUNT 
+| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ]
 | union (
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "\\file1", bigint "-1", bigint "0", int 
"0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ],
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "\\file2", bigint "-1", bigint "0", int 
"0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ]
 | ) [ int "NULL" ]
 )
@@ -23,15 +23,15 @@ insert(
 % clob # type
 % 196 # length
 insert(
-| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ] COUNT 
+| table("sys"."cm_tmp") [ "cm_tmp"."i", "cm_tmp"."%TID%" NOT NULL ]
 | union (
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "a:\\file1", bigint "-1", bigint "0", 
int "0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ],
 | | project (
 | | | table ("sys"."copyfrom"(table("cm_tmp"), varchar "|", varchar "\n", 
varchar "NULL", varchar "null", varchar "Z:/file2", bigint "-1", bigint "0", 
int "0", varchar "NULL", int "0", int "1"), 
-| | | ) [ "cm_tmp"."i" ] COUNT 
+| | | ) [ "cm_tmp"."i" ]
 | | ) [ "cm_tmp"."i" ]
 | ) [ int "NULL" ]
 )
diff --git 
a/sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test 
b/sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test
--- a/sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test
+++ b/sql/test/BugTracker-2009/Tests/use_order_column_first.SF-2686008.test
@@ -58,7 +58,7 @@ PLAN select a,b from sorted group by a,b
 ----
 project (
 | group by (
-| | table("sys"."sorted") [ "sorted"."a", "sorted"."b" ] COUNT 
+| | table("sys"."sorted") [ "sorted"."a", "sorted"."b" ]
 | ) [ "sorted"."a", "sorted"."b" ] [ "sorted"."a", "sorted"."b" ]
 ) [ "sorted"."a", "sorted"."b" ]
 
@@ -67,7 +67,7 @@ PLAN select a,b from sorted group by b,a
 ----
 project (
 | group by (
-| | table("sys"."sorted") [ "sorted"."a", "sorted"."b" ] COUNT 
+| | table("sys"."sorted") [ "sorted"."a", "sorted"."b" ]
 | ) [ "sorted"."b", "sorted"."a" ] [ "sorted"."b", "sorted"."a" ]
 ) [ "sorted"."a", "sorted"."b" ]
 
diff --git 
a/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test 
b/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test
--- a/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test
+++ b/sql/test/BugTracker-2010/Tests/LIMIT_OFFSET_big-endian.Bug-2622.test
@@ -20,7 +20,7 @@ query T nosort
    PLAN select * from oblo
 ----
 project (
-| table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| table("sys"."oblo") [ "oblo"."a" ]
 ) [ "oblo"."a" ]
 
 query T nosort
@@ -28,7 +28,7 @@ query T nosort
 ----
 project (
 | top N (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ bigint "NULL", bigint "2" ]
 ) [ "oblo"."a" ]
 
@@ -37,7 +37,7 @@ query T nosort
 ----
 project (
 | top N (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ bigint "2" ]
 ) [ "oblo"."a" ]
 
@@ -46,7 +46,7 @@ query T nosort
 ----
 project (
 | top N (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ bigint "1", bigint "2" ]
 ) [ "oblo"."a" ]
 
@@ -55,7 +55,7 @@ query T nosort
 ----
 project (
 | top N (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ bigint "2", bigint "1" ]
 ) [ "oblo"."a" ]
 
@@ -63,7 +63,7 @@ query T nosort
    PLAN select * from oblo ORDER BY a
 ----
 project (
-| table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| table("sys"."oblo") [ "oblo"."a" ]
 ) [ "oblo"."a" ] [ "oblo"."a" ASC ]
 
 query T nosort
@@ -71,7 +71,7 @@ query T nosort
 ----
 top N (
 | project (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ "oblo"."a" ] [ "oblo"."a" ASC ]
 ) [ bigint "NULL", bigint "2" ]
 
@@ -80,7 +80,7 @@ query T nosort
 ----
 top N (
 | project (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ "oblo"."a" ] [ "oblo"."a" ASC ]
 ) [ bigint "2" ]
 
@@ -89,7 +89,7 @@ query T nosort
 ----
 top N (
 | project (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ "oblo"."a" ] [ "oblo"."a" ASC ]
 ) [ bigint "2", bigint "1" ]
 
@@ -98,7 +98,7 @@ query T nosort
 ----
 top N (
 | project (
-| | table("sys"."oblo") [ "oblo"."a" ] COUNT 
+| | table("sys"."oblo") [ "oblo"."a" ]
 | ) [ "oblo"."a" ] [ "oblo"."a" ASC ]
 ) [ bigint "1", bigint "2" ]
 
diff --git 
a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test
 
b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test
--- 
a/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test
+++ 
b/sql/test/BugTracker-2010/Tests/ORDER_BY_over_UNION_EXCEPT_INTERSECT.Bug-2606.test
@@ -67,12 +67,12 @@ project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
+| | | | table("sys"."t2606a") [ "t2606a"."a" ]
 | | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
 | | ) [ "t2606a"."a" as "%1"."a" ],
 | | project (
 | | | group by (
-| | | | table("sys"."t2606b") [ "t2606b"."a" ] COUNT 
+| | | | table("sys"."t2606b") [ "t2606b"."a" ]
 | | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
 | | ) [ "t2606b"."a" as "%2"."a" ]
 | ) [ "%1"."a" as "%5"."a" ]
@@ -98,12 +98,12 @@ project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
+| | | | table("sys"."t2606a") [ "t2606a"."a" ]
 | | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
 | | ) [ "t2606a"."a" as "%1"."a" ],
 | | project (
 | | | group by (
-| | | | table("sys"."t2606b") [ "t2606b"."a" ] COUNT 
+| | | | table("sys"."t2606b") [ "t2606b"."a" ]
 | | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
 | | ) [ "t2606b"."a" as "%2"."a" ]
 | ) [ "%1"."a" as "%5"."a" ]
@@ -129,12 +129,12 @@ project (
 | distinct union (
 | | project (
 | | | group by (
-| | | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
+| | | | table("sys"."t2606a") [ "t2606a"."a" ]
 | | | ) [ "t2606a"."a" ] [ "t2606a"."a" ]
 | | ) [ "t2606a"."a" as "%1"."a" ],
 | | project (
 | | | group by (
-| | | | table("sys"."t2606b") [ "t2606b"."a" ] COUNT 
+| | | | table("sys"."t2606b") [ "t2606b"."a" ]
 | | | ) [ "t2606b"."a" ] [ "t2606b"."a" ]
 | | ) [ "t2606b"."a" as "%2"."a" ]
 | ) [ "%1"."a" as "%5"."a" ]
@@ -159,10 +159,10 @@ PLAN   select * from t2606a   except   s
 project (
 | distinct except (
 | | project (
-| | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
+| | | table("sys"."t2606a") [ "t2606a"."a" ]
 | | ) [ "t2606a"."a" as "%1"."a" ],
 | | project (
-| | | table("sys"."t2606b") [ "t2606b"."a" ] COUNT 
+| | | table("sys"."t2606b") [ "t2606b"."a" ]
 | | ) [ "t2606b"."a" as "%2"."a" ]
 | ) [ "%1"."a" as "%5"."a" ]
 ) [ "%5"."a" ] [ "%5"."a" ASC ]
@@ -180,10 +180,10 @@ PLAN ( select * from t2606a   except   s
 project (
 | distinct except (
 | | project (
-| | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
+| | | table("sys"."t2606a") [ "t2606a"."a" ]
 | | ) [ "t2606a"."a" as "%1"."a" ],
 | | project (
-| | | table("sys"."t2606b") [ "t2606b"."a" ] COUNT 
+| | | table("sys"."t2606b") [ "t2606b"."a" ]
 | | ) [ "t2606b"."a" as "%2"."a" ]
 | ) [ "%1"."a" as "%5"."a" ]
 ) [ "%5"."a" ] [ "%5"."a" ASC ]
@@ -201,10 +201,10 @@ PLAN ( select * from t2606a ) except ( s
 project (
 | distinct except (
 | | project (
-| | | table("sys"."t2606a") [ "t2606a"."a" ] COUNT 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to