Changeset: 7f32f070fc52 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f32f070fc52
Modified Files:
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.sql
        
sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.stable.out
Branch: Jun2020
Log Message:

Test grouping on the primary key side


diffs (30 lines):

diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.sql
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.sql
--- 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.sql
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.sql
@@ -91,7 +91,9 @@ insert into myt values (1, 'a'),(2, 'b')
 CREATE TABLE "testme" ("good" int,"myid" int NOT NULL,"hello" 
varchar(32),CONSTRAINT "givemeapkey" PRIMARY KEY ("myid"),CONSTRAINT "myfkey" 
FOREIGN KEY ("good") REFERENCES "myt" ("myid"));
 insert into testme values (1, 1, 'a'),(2, 2, 'b'),(3, 3, 'c'),(4, 4, 'd');
 
--- ordering on a primary key side column, the optimization cannot kick in
+-- the optimization cannot kick in while ordering or grouping on a primary key 
side column
 select testme.myid from testme inner join "myt" on testme.good = "myt".myid 
where testme.hello = 'd' order by "myt".great limit 10;
        -- 4
+select count(*) from testme inner join "myt" on testme.good = "myt".myid where 
testme.hello = 'd' group by "myt".great;
+       -- 1
 rollback;
diff --git 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.stable.out
 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.stable.out
--- 
a/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.stable.out
+++ 
b/sql/test/FeatureRequests/Tests/foreign_key_outer_join_dead_code_elimination-prologue.stable.out
@@ -383,6 +383,12 @@ stdout of test 'foreign_key_outer_join_d
 % int # type
 % 1 # length
 [ 4    ]
+#select count(*) from testme inner join "myt" on testme.good = "myt".myid 
where testme.hello = 'd' group by "myt".great;
+% sys.%3 # table_name
+% %3 # name
+% bigint # type
+% 1 # length
+[ 1    ]
 #rollback;
 
 # 01:44:33 >  
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to