Changeset: 833fac36dadb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=833fac36dadb Modified Files: sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out Branch: Aug2011 Log Message:
updated test & stable output: with LIMIT queries, it appears that the slice() operation in no longer (or at least not always) pushed down below and into the mat.pack(); thus, we need to check whether there is a matslice() or a mat.pack(). This also makes this test work with single-threaded execution, again. diffs (64 lines): diff --git a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql --- a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql +++ b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql @@ -58,19 +58,23 @@ create function GetTrace() TRACE select x,y from slice_test limit 1; -- When mitosis was activated (i.e., the MAL plan contains mat.*() statements, --- then there sould also be at least one mat.slice() statement. +-- then there sould also be at least one mat.slice() (or mat.pack()) statement. +WITH TheTrace AS ( SELECT * FROM GetTrace() ) SELECT count(*) FROM -( SELECT count(*) AS mat FROM GetTrace() WHERE stmt LIKE '% := mat.%' ) as m, -( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms -WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); +( SELECT count(*) AS mat FROM TheTrace WHERE stmt LIKE '% := mat.%' ) as m, +( SELECT count(*) AS mat_slice FROM TheTrace WHERE stmt LIKE '% := mat.slice(%' ) as ms, +( SELECT count(*) AS mat_pack FROM TheTrace WHERE stmt LIKE '% := mat.pack(%' ) as mp +WHERE ( mat = 0 AND mat_slice+mat_pack = 0 ) OR ( mat > 0 AND mat_slice+mat_pack > 0 ); TRACE select cast(x as string)||'-bla-'||cast(y as string) from slice_test limit 1; -- When mitosis was activated (i.e., the MAL plan contains mat.*() statements, --- then there sould also be at least one mat.slice() statement. +-- then there sould also be at least one mat.slice() (or mat.pack()) statement. +WITH TheTrace AS ( SELECT * FROM GetTrace() ) SELECT count(*) FROM -( SELECT count(*) AS mat FROM GetTrace() WHERE stmt LIKE '% := mat.%' ) as m, -( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms -WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); +( SELECT count(*) AS mat FROM TheTrace WHERE stmt LIKE '% := mat.%' ) as m, +( SELECT count(*) AS mat_slice FROM TheTrace WHERE stmt LIKE '% := mat.slice(%' ) as ms, +( SELECT count(*) AS mat_pack FROM TheTrace WHERE stmt LIKE '% := mat.pack(%' ) as mp +WHERE ( mat = 0 AND mat_slice+mat_pack = 0 ) OR ( mat > 0 AND mat_slice+mat_pack > 0 ); drop function GetTrace; diff --git a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out --- a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out +++ b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out @@ -109,10 +109,10 @@ Over.. #( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms #WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); % .m # table_name -% L6 # name +% L7 # name % wrd # type % 1 # length -[ 0 ] +[ 1 ] #TRACE select cast(x as string)||'-bla-'||cast(y as string) from slice_test limit 1; % sys. # table_name % concat_concat_x # name @@ -124,10 +124,10 @@ Over.. #( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms #WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); % .m # table_name -% L6 # name +% L7 # name % wrd # type % 1 # length -[ 0 ] +[ 1 ] #drop function GetTrace; #drop table slice_test; _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
