From 5eef8d7870382c748900ead0a84580844f477fac Mon Sep 17 00:00:00 2001 From: lzmhhh123 Date: Thu, 6 May 2021 17:03:50 +0800 Subject: [PATCH] add test for enum Signed-off-by: lzmhhh123 --- push-down-test/prepare/0_data.sql | 206 ++++++++ push-down-test/sql/randgen/11_enum.sql | 642 +++++++++++++++++++++++++ 2 files changed, 848 insertions(+) create mode 100644 push-down-test/sql/randgen/11_enum.sql diff --git a/push-down-test/prepare/0_data.sql b/push-down-test/prepare/0_data.sql index 54be5fd..5a81487 100644 --- a/push-down-test/prepare/0_data.sql +++ b/push-down-test/prepare/0_data.sql @@ -1928,3 +1928,209 @@ UNLOCK TABLES; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +create table tbl_0 ( col_0 enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday') not null , col_1 enum('copper','bronze','silver','gold') not null , col_2 enum('PENNY','NICKLE','DIME','QUARTER') not null , col_3 enum('WINTER','SPRING','SUMMER','FALL') default 'WINTER' not null , col_4 enum('copper','bronze','silver','gold') default 'silver' , primary key idx_0 ( col_3 ) /*T![clustered_index] clustered */ , unique key idx_1 ( col_3 ) , unique key idx_2 ( col_0,col_3,col_2,col_4 ) ) ; +create table tbl_1 ( col_5 enum('copper','bronze','silver','gold') default 'bronze' , col_6 enum('Newspaper','Newsletter','Magazine','Book') default 'Newsletter' , col_7 enum('Alice','Bob','Charlie','David') not null , col_8 enum('WINTER','SPRING','SUMMER','FALL') default 'FALL' not null , col_9 enum('copper','bronze','silver','gold') , primary key idx_3 ( col_6 ) /*T![clustered_index] clustered */ , unique key idx_4 ( col_7,col_5,col_8,col_9,col_6 ) , unique key idx_5 ( col_6,col_9 ) ) ; +create table tbl_2 ( col_10 enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday') default 'Wednesday' , col_11 enum('Alice','Bob','Charlie','David') default 'Bob' , col_12 enum('Alice','Bob','Charlie','David') , col_13 enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday') default 'Saturday' not null , col_14 enum('WINTER','SPRING','SUMMER','FALL') default 'SUMMER' not null , primary key idx_6 ( col_12 ) /*T![clustered_index] clustered */ , unique key idx_7 ( col_12,col_10,col_11 ) ) ; +create table tbl_3 ( col_15 enum('WINTER','SPRING','SUMMER','FALL') default 'FALL' , col_16 enum('PENNY','NICKLE','DIME','QUARTER') default 'NICKLE' , col_17 enum('Alice','Bob','Charlie','David') default 'Bob' not null , col_18 enum('copper','bronze','silver','gold') default 'silver' not null , col_19 enum('Newspaper','Newsletter','Magazine','Book') not null , primary key idx_8 ( col_15,col_19 ) /*T![clustered_index] clustered */ , key idx_9 ( col_16 ) , unique key idx_10 ( col_17,col_18 ) ) ; +create table tbl_4 ( col_20 enum('WINTER','SPRING','SUMMER','FALL') default 'WINTER' , col_21 enum('Newspaper','Newsletter','Magazine','Book') default 'Book' not null , col_22 enum('Alice','Bob','Charlie','David') , col_23 enum('WINTER','SPRING','SUMMER','FALL') not null , col_24 enum('copper','bronze','silver','gold') not null , primary key idx_11 ( col_20,col_22,col_21,col_23,col_24 ) /*T![clustered_index] clustered */ , key idx_12 ( col_22 ) , key idx_13 ( col_23 ) , unique key idx_14 ( col_23 ) ) ; +insert into tbl_0 values ( 'Monday','gold','NICKLE','SPRING','bronze' ) ; +insert into tbl_0 values ( 'Friday','gold','DIME','SPRING','gold' ) ; +insert into tbl_0 values ( 'Thursday','silver','DIME','WINTER','bronze' ) ; +insert into tbl_0 values ( 'Monday','copper','PENNY','SPRING','silver' ) ; +insert into tbl_0 values ( 'Thursday','gold','NICKLE','WINTER','bronze' ) ; +insert into tbl_0 values ( 'Tuesday','silver','PENNY','FALL','gold' ) ; +insert into tbl_0 values ( 'Monday','silver','NICKLE','WINTER',null ) ; +insert into tbl_0 values ( 'Monday','silver','NICKLE','SPRING','bronze' ) ; +insert into tbl_0 values ( 'Monday','silver','DIME','WINTER','gold' ) ; +insert into tbl_0 values ( 'Sunday','gold','DIME','WINTER','bronze' ) ; +insert into tbl_0 values ( 'Sunday','copper','NICKLE','SPRING','gold' ) ; +insert into tbl_0 values ( 'Tuesday','gold','DIME','FALL','bronze' ) ; +insert into tbl_0 values ( 'Friday','bronze','PENNY','SPRING','silver' ) ; +insert into tbl_0 values ( 'Wednesday','gold','NICKLE','FALL','gold' ) ; +insert into tbl_0 values ( 'Monday','bronze','QUARTER','SUMMER','copper' ) ; +insert into tbl_0 values ( 'Saturday','bronze','DIME','WINTER','gold' ) ; +insert into tbl_0 values ( 'Saturday','silver','DIME','FALL','gold' ) ; +insert into tbl_0 values ( 'Tuesday','copper','NICKLE','SUMMER','copper' ) ; +insert into tbl_0 values ( 'Monday','bronze','PENNY','WINTER','copper' ) ; +insert into tbl_0 values ( 'Wednesday','copper','PENNY','FALL','bronze' ) ; +insert into tbl_0 values ( 'Monday','gold','QUARTER','SPRING','copper' ) ; +insert into tbl_0 values ( 'Thursday','silver','NICKLE','FALL','gold' ) ; +insert into tbl_0 values ( 'Tuesday','gold','NICKLE','WINTER','gold' ) ; +insert into tbl_0 values ( 'Monday','silver','NICKLE','FALL','bronze' ) ; +insert into tbl_0 values ( 'Thursday','silver','NICKLE','FALL','silver' ) ; +insert into tbl_0 values ( 'Monday','copper','DIME','WINTER','silver' ) ; +insert into tbl_0 values ( 'Tuesday','silver','QUARTER','FALL','silver' ) ; +insert into tbl_0 values ( 'Saturday','copper','QUARTER','SPRING','gold' ) ; +insert into tbl_0 values ( 'Wednesday','copper','DIME','SUMMER','copper' ) ; +insert into tbl_0 values ( 'Wednesday','bronze','PENNY','FALL','silver' ) ; +insert into tbl_0 values ( 'Monday','silver','NICKLE','SPRING',null ) ; +insert into tbl_0 values ( 'Thursday','gold','NICKLE','FALL','bronze' ) ; +insert into tbl_0 values ( 'Saturday','silver','QUARTER','SPRING','bronze' ) ; +insert into tbl_0 values ( 'Tuesday','silver','PENNY','SPRING','silver' ) ; +insert into tbl_0 values ( 'Tuesday','copper','QUARTER','SPRING','copper' ) ; +insert into tbl_0 values ( 'Sunday','bronze','NICKLE','SUMMER','gold' ) ; +insert into tbl_0 values ( 'Monday','bronze','QUARTER','SUMMER','gold' ) ; +insert into tbl_0 values ( 'Monday','copper','NICKLE','FALL','bronze' ) ; +insert into tbl_0 values ( 'Tuesday','silver','NICKLE','SPRING','bronze' ) ; +insert into tbl_0 values ( 'Friday','copper','QUARTER','WINTER','bronze' ) ; +insert into tbl_1 values ( 'bronze','Magazine','Bob','SPRING','silver' ) ; +insert into tbl_1 values ( 'copper','Newspaper','Charlie','SUMMER','silver' ) ; +insert into tbl_1 values ( 'silver','Book','Bob','SUMMER','copper' ) ; +insert into tbl_1 values ( 'copper','Book','Alice','WINTER','silver' ) ; +insert into tbl_1 values ( 'copper','Newspaper','Alice','SUMMER','gold' ) ; +insert into tbl_1 values ( 'gold','Book','David','WINTER','gold' ) ; +insert into tbl_1 values ( 'bronze','Book','Charlie','WINTER','silver' ) ; +insert into tbl_1 values ( 'bronze','Newsletter','Charlie','SPRING','silver' ) ; +insert into tbl_1 values ( 'gold','Newsletter','Alice','WINTER','bronze' ) ; +insert into tbl_1 values ( null,'Newsletter','Bob','WINTER','silver' ) ; +insert into tbl_1 values ( 'bronze','Book','Bob','SPRING','bronze' ) ; +insert into tbl_1 values ( 'bronze','Newspaper','David','SPRING','bronze' ) ; +insert into tbl_1 values ( 'copper','Magazine','David','SUMMER','copper' ) ; +insert into tbl_1 values ( 'copper','Newsletter','David','SUMMER','bronze' ) ; +insert into tbl_1 values ( 'gold','Book','Charlie','WINTER','bronze' ) ; +insert into tbl_1 values ( 'silver','Newsletter','Bob','FALL','gold' ) ; +insert into tbl_1 values ( null,'Newspaper','Alice','SUMMER','silver' ) ; +insert into tbl_1 values ( 'gold',null,'Alice','WINTER','copper' ) ; +insert into tbl_1 values ( 'bronze','Book','Bob','SUMMER','silver' ) ; +insert into tbl_1 values ( 'copper','Book','David','SUMMER','copper' ) ; +insert into tbl_1 values ( 'bronze','Newspaper','Alice','SPRING','silver' ) ; +insert into tbl_1 values ( 'copper','Book','Charlie','FALL','bronze' ) ; +insert into tbl_1 values ( 'copper','Magazine','Bob','SPRING','silver' ) ; +insert into tbl_1 values ( 'silver','Newsletter','Alice','FALL','bronze' ) ; +insert into tbl_1 values ( 'copper','Newsletter','David','FALL','copper' ) ; +insert into tbl_1 values ( 'bronze',null,'Alice','FALL','silver' ) ; +insert into tbl_1 values ( 'gold','Newsletter','Charlie','SUMMER','silver' ) ; +insert into tbl_1 values ( 'copper','Magazine','Alice','SUMMER','bronze' ) ; +insert into tbl_1 values ( 'copper','Book','David','WINTER','copper' ) ; +insert into tbl_1 values ( 'copper','Newsletter','Bob','SUMMER','bronze' ) ; +insert into tbl_1 values ( 'gold','Book','David','FALL','bronze' ) ; +insert into tbl_1 values ( 'copper',null,'Alice','SPRING','silver' ) ; +insert into tbl_1 values ( 'copper','Magazine','Alice','FALL','gold' ) ; +insert into tbl_1 values ( 'gold','Magazine','Alice','FALL','gold' ) ; +insert into tbl_1 values ( 'gold','Newsletter','David','SUMMER','copper' ) ; +insert into tbl_1 values ( 'silver','Magazine','David','FALL','copper' ) ; +insert into tbl_1 values ( 'bronze','Newsletter','Charlie','FALL','gold' ) ; +insert into tbl_1 values ( 'silver','Newspaper','Alice','SPRING','silver' ) ; +insert into tbl_1 values ( 'bronze','Book','Bob','FALL','gold' ) ; +insert into tbl_1 values ( 'copper','Book','Alice','SUMMER','silver' ) ; +insert into tbl_2 values ( 'Thursday','Alice','Bob','Friday','SUMMER' ) ; +insert into tbl_2 values ( 'Sunday','Alice','Charlie','Sunday','WINTER' ) ; +insert into tbl_2 values ( 'Tuesday','David','Bob','Monday','WINTER' ) ; +insert into tbl_2 values ( 'Thursday','David','Charlie','Friday','WINTER' ) ; +insert into tbl_2 values ( 'Saturday','David','Charlie','Saturday','WINTER' ) ; +insert into tbl_2 values ( 'Wednesday','Alice','Charlie','Sunday','FALL' ) ; +insert into tbl_2 values ( 'Tuesday','Bob','Bob','Sunday','WINTER' ) ; +insert into tbl_2 values ( 'Monday','Bob','Charlie','Sunday','SUMMER' ) ; +insert into tbl_2 values ( 'Monday','David','Bob','Monday','FALL' ) ; +insert into tbl_2 values ( 'Thursday','Charlie','David','Sunday','SPRING' ) ; +insert into tbl_2 values ( 'Saturday','Bob','Alice','Sunday','FALL' ) ; +insert into tbl_2 values ( 'Wednesday','Bob','Alice','Tuesday','SPRING' ) ; +insert into tbl_2 values ( 'Sunday','David','Charlie','Saturday','WINTER' ) ; +insert into tbl_2 values ( 'Monday','Alice','David','Monday','SUMMER' ) ; +insert into tbl_2 values ( 'Thursday','Bob','Alice','Sunday','FALL' ) ; +insert into tbl_2 values ( 'Sunday','Charlie','Bob','Sunday','SUMMER' ) ; +insert into tbl_2 values ( 'Monday','Charlie','Charlie','Tuesday','FALL' ) ; +insert into tbl_2 values ( 'Tuesday','Charlie','David','Thursday','SPRING' ) ; +insert into tbl_2 values ( 'Wednesday','Bob',null,'Sunday','WINTER' ) ; +insert into tbl_2 values ( 'Monday','David','Charlie','Monday','SUMMER' ) ; +insert into tbl_2 values ( 'Saturday','David','Bob','Saturday','SUMMER' ) ; +insert into tbl_2 values ( 'Saturday','Bob','Bob','Monday','WINTER' ) ; +insert into tbl_2 values ( 'Sunday','Bob','Bob','Saturday','FALL' ) ; +insert into tbl_2 values ( 'Tuesday','Charlie','Charlie','Thursday','WINTER' ) ; +insert into tbl_2 values ( 'Thursday','Charlie','David','Tuesday','SPRING' ) ; +insert into tbl_2 values ( 'Tuesday','Bob','David','Tuesday','SPRING' ) ; +insert into tbl_2 values ( 'Monday','David','Charlie','Saturday','SUMMER' ) ; +insert into tbl_2 values ( 'Thursday','Alice','Bob','Friday','WINTER' ) ; +insert into tbl_2 values ( 'Saturday','David','David','Tuesday','SUMMER' ) ; +insert into tbl_2 values ( 'Wednesday','Bob','David','Sunday','WINTER' ) ; +insert into tbl_2 values ( 'Thursday','David','Alice','Saturday','FALL' ) ; +insert into tbl_2 values ( 'Sunday','Alice','Alice','Sunday','SPRING' ) ; +insert into tbl_2 values ( 'Sunday','Bob','Charlie','Tuesday','FALL' ) ; +insert into tbl_2 values ( 'Wednesday','Charlie','Alice','Wednesday','SUMMER' ) ; +insert into tbl_2 values ( 'Saturday','Alice','Bob','Monday','WINTER' ) ; +insert into tbl_2 values ( null,'David','Bob','Wednesday','SUMMER' ) ; +insert into tbl_2 values ( 'Monday','Charlie','Bob','Monday','SPRING' ) ; +insert into tbl_2 values ( 'Tuesday','Charlie','Bob','Friday','WINTER' ) ; +insert into tbl_2 values ( 'Wednesday','Charlie','Charlie','Sunday','WINTER' ) ; +insert into tbl_2 values ( 'Friday','Alice','Bob','Tuesday','SUMMER' ) ; +insert into tbl_3 values ( 'FALL','QUARTER','Alice','silver','Book' ) ; +insert into tbl_3 values ( 'SPRING','NICKLE','Charlie','gold','Newsletter' ) ; +insert into tbl_3 values ( 'SUMMER','DIME','Bob','copper','Magazine' ) ; +insert into tbl_3 values ( 'SUMMER','NICKLE','Charlie','silver','Newsletter' ) ; +insert into tbl_3 values ( 'FALL','PENNY','David','copper','Newspaper' ) ; +insert into tbl_3 values ( 'FALL','NICKLE','Charlie','bronze','Book' ) ; +insert into tbl_3 values ( 'SPRING','DIME','Charlie','copper','Newsletter' ) ; +insert into tbl_3 values ( 'SPRING','DIME','Charlie','copper','Book' ) ; +insert into tbl_3 values ( 'WINTER','QUARTER','Alice','gold','Magazine' ) ; +insert into tbl_3 values ( 'FALL','QUARTER','Alice','bronze','Magazine' ) ; +insert into tbl_3 values ( 'FALL','QUARTER','Bob','bronze','Magazine' ) ; +insert into tbl_3 values ( 'FALL','QUARTER','Alice','bronze','Book' ) ; +insert into tbl_3 values ( 'SPRING','NICKLE','Bob','bronze','Newspaper' ) ; +insert into tbl_3 values ( 'SUMMER','PENNY','David','copper','Newspaper' ) ; +insert into tbl_3 values ( 'WINTER','PENNY','David','copper','Magazine' ) ; +insert into tbl_3 values ( 'FALL','DIME','Charlie','bronze','Magazine' ) ; +insert into tbl_3 values ( 'SPRING','PENNY','Charlie','gold','Newspaper' ) ; +insert into tbl_3 values ( 'SPRING','DIME','Charlie','gold','Magazine' ) ; +insert into tbl_3 values ( 'SPRING','QUARTER','Charlie','copper','Magazine' ) ; +insert into tbl_3 values ( 'SUMMER','DIME','Charlie','gold','Newsletter' ) ; +insert into tbl_3 values ( 'FALL','PENNY','Charlie','gold','Book' ) ; +insert into tbl_3 values ( 'FALL','DIME','Alice','copper','Book' ) ; +insert into tbl_3 values ( 'WINTER','PENNY','Alice','gold','Newsletter' ) ; +insert into tbl_3 values ( 'SUMMER','DIME','Charlie','copper','Newsletter' ) ; +insert into tbl_3 values ( 'SUMMER','DIME','Charlie','bronze','Magazine' ) ; +insert into tbl_3 values ( 'SPRING','PENNY','Bob','gold','Newspaper' ) ; +insert into tbl_3 values ( 'SUMMER','PENNY','David','gold','Newspaper' ) ; +insert into tbl_3 values ( 'SPRING','PENNY','Charlie','gold','Magazine' ) ; +insert into tbl_3 values ( 'FALL','NICKLE','Alice','gold','Newspaper' ) ; +insert into tbl_3 values ( 'SPRING','NICKLE','David','gold','Book' ) ; +insert into tbl_3 values ( 'FALL','NICKLE','David','silver','Book' ) ; +insert into tbl_3 values ( 'SUMMER','DIME','David','silver','Magazine' ) ; +insert into tbl_3 values ( 'FALL','NICKLE','Charlie','bronze','Newspaper' ) ; +insert into tbl_3 values ( 'FALL','QUARTER','Charlie','bronze','Book' ) ; +insert into tbl_3 values ( 'WINTER','QUARTER','Alice','gold','Book' ) ; +insert into tbl_3 values ( 'WINTER','DIME','David','silver','Newspaper' ) ; +insert into tbl_3 values ( 'SUMMER','QUARTER','Alice','gold','Book' ) ; +insert into tbl_3 values ( 'WINTER','NICKLE','Bob','gold','Book' ) ; +insert into tbl_3 values ( 'WINTER','DIME','David','bronze','Newsletter' ) ; +insert into tbl_3 values ( 'SPRING','DIME','Bob','bronze','Newspaper' ) ; +insert into tbl_4 values ( 'FALL','Book','Charlie','WINTER','copper' ) ; +insert into tbl_4 values ( 'SPRING','Newspaper','Charlie','WINTER','gold' ) ; +insert into tbl_4 values ( 'WINTER','Newspaper','David','SPRING','silver' ) ; +insert into tbl_4 values ( 'SPRING','Newspaper','Alice','WINTER','copper' ) ; +insert into tbl_4 values ( 'FALL','Book','David','SUMMER','gold' ) ; +insert into tbl_4 values ( 'SPRING','Magazine','Alice','SPRING','silver' ) ; +insert into tbl_4 values ( 'SPRING','Newsletter','Alice','SPRING','gold' ) ; +insert into tbl_4 values ( 'WINTER','Magazine','David','SPRING','bronze' ) ; +insert into tbl_4 values ( 'SUMMER','Newsletter','Bob','SUMMER','gold' ) ; +insert into tbl_4 values ( 'WINTER','Book','David','SUMMER','silver' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','Alice','SUMMER','gold' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','David','WINTER','copper' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','Bob','FALL','bronze' ) ; +insert into tbl_4 values ( 'SUMMER','Newsletter','Charlie','FALL','gold' ) ; +insert into tbl_4 values ( 'WINTER','Magazine','David','FALL','copper' ) ; +insert into tbl_4 values ( 'SPRING','Newsletter','Alice','SUMMER','silver' ) ; +insert into tbl_4 values ( 'WINTER','Newsletter','David','FALL','bronze' ) ; +insert into tbl_4 values ( 'FALL','Newsletter','David','SPRING','bronze' ) ; +insert into tbl_4 values ( 'FALL','Newsletter','Alice','SPRING','copper' ) ; +insert into tbl_4 values ( 'WINTER','Newsletter','Alice','SPRING','gold' ) ; +insert into tbl_4 values ( 'SUMMER','Newsletter','Alice','SPRING','copper' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','David','WINTER','silver' ) ; +insert into tbl_4 values ( 'SPRING','Magazine','Alice','WINTER','copper' ) ; +insert into tbl_4 values ( 'WINTER','Book','Alice','WINTER','bronze' ) ; +insert into tbl_4 values ( 'SUMMER','Book','Bob','WINTER','gold' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','Alice','WINTER','silver' ) ; +insert into tbl_4 values ( 'SPRING','Newspaper','Alice','WINTER','copper' ) ; +insert into tbl_4 values ( 'WINTER','Newsletter','Charlie','FALL','silver' ) ; +insert into tbl_4 values ( 'FALL','Newspaper','Bob','FALL','silver' ) ; +insert into tbl_4 values ( 'FALL','Newspaper','Alice','FALL','bronze' ) ; +insert into tbl_4 values ( 'FALL','Newspaper','Charlie','FALL','gold' ) ; +insert into tbl_4 values ( 'SPRING','Magazine','Bob','WINTER','silver' ) ; +insert into tbl_4 values ( 'FALL','Magazine','Alice','FALL','gold' ) ; +insert into tbl_4 values ( 'FALL','Book','Alice','WINTER','gold' ) ; +insert into tbl_4 values ( 'SUMMER','Newspaper','David','FALL','bronze' ) ; +insert into tbl_4 values ( 'WINTER','Newsletter','Charlie','SPRING','gold' ) ; +insert into tbl_4 values ( 'SPRING','Book','Charlie','FALL','gold' ) ; +insert into tbl_4 values ( 'SPRING','Newsletter','Bob','FALL','bronze' ) ; +insert into tbl_4 values ( 'FALL','Magazine','Alice','SPRING','gold' ) ; +insert into tbl_4 values ( 'FALL','Magazine','Charlie','SUMMER','silver' ) ; \ No newline at end of file diff --git a/push-down-test/sql/randgen/11_enum.sql b/push-down-test/sql/randgen/11_enum.sql new file mode 100644 index 0000000..9dd0639 --- /dev/null +++ b/push-down-test/sql/randgen/11_enum.sql @@ -0,0 +1,642 @@ +select /*+ agg_to_cop() stream_agg() */ bit_and(col_22) aggCol from (select * from tbl_4 where tbl_4.col_24 <= 'gold' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_22 ; +select col_4 from tbl_0 where tbl_0.col_3 in ( 'SUMMER' , 'WINTER' , 'SUMMER' ) for update ; +select /*+ agg_to_cop() hash_agg() */ max(col_12) aggCol from (select * from tbl_2 where tbl_2.col_11 < 'Alice' order by col_12 ) ordered_tbl for update ; +create table tbl_5 like tbl_3; +create table tbl_6 ( col_30 enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday') default 'Friday' , col_31 enum('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday') not null , primary key idx_18 ( col_30 ) /*T![clustered_index] clustered */ , key idx_19 ( col_31,col_30 ) , key idx_20 ( col_30 ) , key idx_21 ( col_31,col_30 ) ) ; +select col_19,col_16 from tbl_5 where tbl_5.col_17 >= 'David' and (col_17, col_18) = ('Charlie', 'copper') or (col_17, col_18) = ('David', 'silver') or (col_17, col_18) = ('David', 'bronze') or (col_17, col_18) = ('David', 'bronze') for update ; +select /*+ HASH_JOIN( tbl_2 , tbl_1 ) */ tbl_2.col_10 , tbl_1.* from tbl_2 join tbl_1 ; +select tbl_6.* from tbl_6 where col_31 in ( select col_17 from tbl_5 where tbl_5.col_15 <= 'SPRING' ) ; +select * from tbl_3 where (col_17, col_18) in (('Alice', 'silver'), ('David', 'gold'), ('David', 'bronze'), ('Charlie', 'copper')) ; +select /*+ INL_HASH_JOIN( tbl_2 , tbl_6 ) */ tbl_2.* from tbl_2 where col_12 in ( select col_30 from tbl_6 where tbl_2.col_14 != 'SPRING' ) ; +select /*+ agg_to_cop() */ approx_count_distinct(col_9) aggCol from (select * from tbl_1 where (col_6, col_9) = ('Magazine', 'copper') or (col_6, col_9) = ('Book', 'silver') or (col_6, col_9) = ('Book', 'gold') or (col_6, col_9) = ('Newspaper', 'silver') order by col_6 ) ordered_tbl ; +select /*+ MERGE_JOIN( tbl_1 , tbl_3 ) */ tbl_1.* , tbl_3.* from tbl_1 join tbl_3 on col_6 <= col_16 or col_7 <= col_16 where tbl_3.col_15 in ( null , 'SUMMER' , 'SPRING' , 'SPRING' , 'FALL' , null , 'SPRING' , 'SPRING' , 'SPRING' , 'FALL' , 'SPRING' , 'SPRING' , 'FALL' , 'WINTER' ) or tbl_1.col_8 <> 'FALL' and tbl_1.col_8 in ( 'WINTER' , 'SUMMER' , 'SUMMER' , 'SUMMER' , 'SUMMER' ) ; +select /*+ agg_to_cop() stream_agg() */ sum(col_16) aggCol from (select * from tbl_3 where tbl_3.col_16 = 'PENNY' and tbl_3.col_15 in ( 'FALL' ) order by col_15,col_19 ) ordered_tbl group by col_17,col_18,col_19,col_16 for update ; +select /*+ agg_to_cop() hash_agg() */ approx_percentile(col_30, 79) aggCol from (select * from tbl_6 where tbl_6.col_31 > 'Sunday' order by col_30 ) ordered_tbl group by col_31 ; +select /*+ HASH_JOIN( tbl_2 , tbl_1 ) */ tbl_2.col_10, tbl_2.col_12 from tbl_2 where col_11 in ( select col_9 from tbl_1 where tbl_2.col_11 <> 'Alice' ) ; +select /*+ hash_agg() */ stddev_samp(col_24) aggCol from (select * from tbl_4 where tbl_4.col_23 in ( 'WINTER' , 'FALL' , 'WINTER' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_24,col_21 ; +select /*+ MERGE_JOIN( tbl_1 , tbl_5 ) */ tbl_1.col_8, tbl_1.col_9 , tbl_5.* from tbl_1 join tbl_5 ; +select /*+ INL_MERGE_JOIN( tbl_4 , tbl_3 ) */ tbl_4.* , tbl_3.* from tbl_4 join tbl_3 ; +select col_30 from tbl_6 where tbl_6.col_32 <= 'silver' for update ; +select col_17 from tbl_5 where tbl_5.col_15 = 'SUMMER' for update ; +select /*+ HASH_JOIN( tbl_3 , tbl_4 ) */ tbl_3.col_16 , tbl_4.col_23 from tbl_3 join tbl_4 ; +select /*+ HASH_JOIN( tbl_1 , tbl_1 ) */ tbl_1.* , tbl_1.col_6, tbl_1.col_8, tbl_1.col_5, tbl_1.col_7 from tbl_1 join tbl_1 ; +select /*+ stream_agg() */ var_pop(col_10) aggCol from (select * from tbl_2 where tbl_2.col_10 >= 'Tuesday' order by col_12 ) ordered_tbl ; +select /*+ agg_to_cop() */ count(distinct col_32) aggCol from (select * from tbl_6 where tbl_6.col_30 in ( 'Tuesday' , 'Monday' , 'Thursday' , 'Sunday' , 'Monday' , 'Saturday' ) order by col_30 ) ordered_tbl ; +select /*+ INL_MERGE_JOIN( tbl_1 , tbl_0 ) */ tbl_1.* , tbl_0.* from tbl_1 join tbl_0 ; +select /*+ agg_to_cop() hash_agg() */ avg(col_31) aggCol from (select * from tbl_6 where tbl_6.col_31 > 'Tuesday' order by col_30 ) ordered_tbl group by col_32 ; +select tbl_3.col_19 from tbl_3 where col_15 in ( select col_16 from tbl_3 where (col_17, col_18) = ('Alice', 'gold') or (col_17, col_18) = ('Charlie', 'gold') or (col_17, col_18) = ('Bob', 'bronze') or (col_17, col_18) = ('Alice', 'copper') ) ; +select * from tbl_3 where tbl_3.col_15 in ( 'WINTER' , 'WINTER' ) ; +select /*+ agg_to_cop() */ bit_and(col_30) aggCol from (select * from tbl_6 where tbl_6.col_31 in ( 'Friday' ) order by col_30 ) ordered_tbl for update ; +select * from tbl_3 where tbl_3.col_15 in ( 'SPRING' , 'SUMMER' , 'FALL' , 'WINTER' , 'SPRING' , 'SPRING' , 'FALL' ) and tbl_3.col_17 in ( 'Bob' , 'Alice' , 'Alice' , 'Bob' , 'Alice' , 'Alice' , 'Bob' , 'David' , 'Charlie' , 'Charlie' ) for update ; +select col_16 from tbl_5 where tbl_5.col_19 > 'Newsletter' and tbl_5.col_19 <= 'Magazine' and (col_17, col_18) in (('David', 'gold')) ; +select /*+ stream_agg() */ approx_percentile(col_4, 36) aggCol from (select * from tbl_0 where tbl_0.col_1 > 'gold' order by col_3 ) ordered_tbl group by col_0,col_3,col_1 for update ; +select /*+ hash_agg() */ count(col_18) aggCol from (select * from tbl_3 where tbl_3.col_16 >= 'DIME' order by col_15,col_19 ) ordered_tbl group by col_19,col_18 ; +select /*+ MERGE_JOIN( tbl_1 , tbl_1 ) */ tbl_1.col_6, tbl_1.col_8, tbl_1.col_9, tbl_1.col_34, tbl_1.col_7 from tbl_1 where col_7 in ( select col_5 from tbl_1 where tbl_1.col_5 in ( 'copper' , 'copper' , 'bronze' , 'gold' , 'gold' , 'copper' ) ) ; +select /*+ */ tbl_6.col_30 , tbl_1.col_8, tbl_1.col_9 from tbl_6 join tbl_1 ; +select /*+ agg_to_cop() stream_agg() */ json_objectagg(col_17,col_18) aggCol from (select * from tbl_3 where tbl_3.col_17 <= 'Bob' order by col_15,col_19 ) ordered_tbl group by col_16,col_19 for update ; +select /*+ stream_agg() */ var_samp(col_9) aggCol from (select * from tbl_1 where tbl_1.col_9 > 'gold' order by col_6 ) ordered_tbl ; +select col_4 from tbl_0 where tbl_0.col_3 > 'WINTER' and tbl_0.col_3 in ( 'FALL' , 'SUMMER' , 'FALL' ) ; +select /*+ INL_JOIN( tbl_6 , tbl_4 ) */ tbl_6.col_31 from tbl_6 where col_31 in ( select col_24 from tbl_4 where (col_30) = ('Saturday') or (col_30) = ('Friday') or (col_30) = ('Saturday') or (col_30) = ('Tuesday') ) ; +select approx_count_distinct(col_12) aggCol from (select * from tbl_2 where (col_12 = 'Charlie' and col_10 = 'Thursday' and col_11 = 'David') or (col_12 = 'Bob' and col_10 = 'Sunday' and col_11 = 'Bob') or (col_12 = 'Charlie' and col_10 = 'Thursday' and col_11 = 'David') order by col_12 ) ordered_tbl group by col_10,col_14,col_12,col_11 ; +select tbl_3.* from tbl_3 where col_17 in ( select col_20 from tbl_4 where (col_23) = ('WINTER') ) ; +select /*+ agg_to_cop() */ bit_xor(col_4) aggCol from (select * from tbl_0 where tbl_0.col_0 <= 'Tuesday' order by col_3 ) ordered_tbl for update ; +select * from tbl_0 where (col_0, col_3, col_2, col_4) in (('Monday', 'SPRING', 'QUARTER', 'copper'), ('Saturday', 'SUMMER', 'NICKLE', 'silver'), ('Monday', 'WINTER', 'PENNY', 'copper'), ('Monday', 'WINTER', 'DIME', 'copper')) ; +select * from tbl_0 where tbl_0.col_2 in ( 'PENNY' , 'NICKLE' , 'NICKLE' , 'NICKLE' , 'NICKLE' , 'QUARTER' , 'DIME' , 'QUARTER' , 'PENNY' , 'DIME' , 'PENNY' , 'NICKLE' ) or tbl_0.col_0 in ( 'Monday' ) ; +select * from tbl_2 where (col_12, col_10, col_11) in (('Charlie', 'Monday', 'David')) ; +select tbl_0.* , tbl_2.col_11 from tbl_0 left join tbl_2 on col_4 >= col_12 and col_0 != col_10 or col_3 = col_12 where tbl_0.col_1 in ( 'copper' ) ; +select /*+ hash_agg() */ stddev_samp(distinct col_31) aggCol from (select * from tbl_6 where tbl_6.col_30 in ( 'Sunday' , 'Thursday' ) or tbl_6.col_32 in ( 'bronze' , 'copper' , 'copper' ) order by col_30 ) ordered_tbl group by col_30 ; +select * from tbl_5 where tbl_5.col_16 in ( 'NICKLE' , 'DIME' , 'NICKLE' , 'NICKLE' , 'QUARTER' ) ; +select col_12 from tbl_2 where tbl_2.col_11 >= 'Bob' and tbl_2.col_11 <= 'Charlie' or (col_12) in (('Charlie')) for update ; +select * from tbl_3 where tbl_3.col_35 in ( 'Newspaper' ) ; +select /*+ MERGE_JOIN( tbl_3 , tbl_1 ) */ tbl_3.* , tbl_1.* from tbl_3 join tbl_1 ; +select /*+ */ tbl_3.* , tbl_5.* from tbl_3 join tbl_5 ; +select col_16,col_18 from tbl_5 where (col_17, col_18) in (('Charlie', 'copper'), ('David', 'copper'), ('Bob', 'silver')) for update ; +select /*+ hash_agg() */ bit_xor(col_7) aggCol from (select * from tbl_1 where tbl_1.col_5 <> 'bronze' order by col_6 ) ordered_tbl group by col_7 for update ; +select /*+ agg_to_cop() stream_agg() */ bit_and(col_5) aggCol from (select * from tbl_1 where tbl_1.col_6 in ( 'Magazine' ) order by col_6 ) ordered_tbl for update ; +select /*+ hash_agg() */ group_concat(distinct col_10 order by col_10) aggCol from (select * from tbl_2 where tbl_2.col_12 = 'Bob' and tbl_2.col_10 <> 'Sunday' order by col_12 ) ordered_tbl ; +select col_5 from tbl_1 where tbl_1.col_6 in ( 'Newsletter' , 'Book' ) ; +select col_12,col_11,col_14 from tbl_2 where (col_12 = 'David' and col_10 = 'Monday' and col_11 = 'Alice') ; +select col_24 from tbl_4 where tbl_4.col_20 in ( 'FALL' , 'FALL' , 'FALL' , 'SUMMER' , 'SUMMER' , 'WINTER' , 'SUMMER' , 'FALL' , 'FALL' , 'SUMMER' ) or tbl_4.col_24 in ( 'bronze' ) or tbl_4.col_23 != 'SPRING' for update ; +select col_37 from tbl_5 where (col_15, col_19) in (('FALL', 'Newspaper'), ('SUMMER', 'Magazine')) ; +select /*+ INL_MERGE_JOIN( tbl_5 , tbl_1 ) */ tbl_5.* , tbl_1.* from tbl_5 join tbl_1 ; +select * from tbl_2 where tbl_2.col_12 in ( 'Bob' , 'David' , 'David' , 'Charlie' ) for update ; +select /*+ agg_to_cop() stream_agg() */ json_objectagg(col_39,col_39) aggCol from (select * from tbl_4 where tbl_4.col_24 in ( 'silver' , 'copper' , 'gold' , 'bronze' , 'bronze' , 'silver' , 'bronze' , 'gold' , 'bronze' , 'silver' , 'silver' ) and tbl_4.col_39 <= 'SPRING' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_23,col_21,col_20 ; +select /*+ agg_to_cop() */ var_samp(distinct col_36) aggCol from (select * from tbl_2 where tbl_2.col_14 >= 'WINTER' order by col_12 ) ordered_tbl group by col_11,col_10,col_12 ; +select /*+ INL_JOIN( tbl_6 , tbl_4 ) */ tbl_6.* , tbl_4.col_21, tbl_4.col_22 from tbl_6 join tbl_4 ; +select * from tbl_4 where tbl_4.col_39 >= 'WINTER' ; +select /*+ INL_MERGE_JOIN( tbl_6 , tbl_4 ) */ tbl_6.col_33 , tbl_4.* from tbl_6 left join tbl_4 on col_30 > col_23 where tbl_4.col_20 > 'SPRING' ; +select tbl_6.* , tbl_0.col_0 from tbl_6 left join tbl_0 on col_30 <= col_4 and col_32 < col_3 or col_31 <> col_0 where (col_30 = 'Wednesday') or (col_30 = 'Wednesday') or (col_30 = 'Saturday') or (col_30 = 'Friday') ; +select /*+ agg_to_cop() stream_agg() */ bit_xor(col_19) aggCol from (select * from tbl_5 where (col_15, col_19) in (('WINTER', 'Magazine'), ('FALL', 'Book'), ('SPRING', 'Book')) order by col_15,col_19 ) ordered_tbl for update ; +select col_11,col_12 from tbl_2 where tbl_2.col_12 in ( 'Charlie' , 'Bob' , 'Charlie' , 'Bob' , 'Charlie' ) and tbl_2.col_36 > 'copper' ; +select tbl_0.col_0, tbl_0.col_38 , tbl_6.* from tbl_0 left join tbl_6 on col_2 != col_31 or col_3 > col_31 and col_2 >= col_31 and col_3 < col_31 and col_3 <= col_30 or col_2 <= col_30 or col_3 != col_30 where tbl_0.col_0 in ( 'Wednesday' , 'Tuesday' , 'Friday' , 'Saturday' , 'Monday' ) or (col_30) in (('Friday'), ('Friday'), ('Saturday')) ; +select * from tbl_0 where tbl_0.col_2 in ( 'NICKLE' , 'DIME' , 'PENNY' , 'DIME' , 'NICKLE' , 'DIME' , 'PENNY' , 'NICKLE' , 'NICKLE' , 'NICKLE' ) for update ; +select /*+ MERGE_JOIN( tbl_1 , tbl_0 ) */ tbl_1.* from tbl_1 where col_7 in ( select col_0 from tbl_0 where tbl_1.col_5 <> 'gold' ) ; +select col_33 from tbl_6 where tbl_6.col_30 in ( 'Sunday' , 'Thursday' , null , 'Wednesday' , 'Sunday' , 'Thursday' , 'Monday' , 'Monday' , 'Tuesday' , 'Friday' , 'Saturday' , 'Sunday' , 'Wednesday' ) ; +select * from tbl_5 where tbl_5.col_37 > 'FALL' and tbl_5.col_19 > 'Newsletter' or tbl_5.col_19 in ( 'Newsletter' , 'Book' ) ; +select /*+ agg_to_cop() */ max(col_18) aggCol from (select * from tbl_5 where tbl_5.col_19 in ( 'Magazine' , 'Magazine' , 'Newsletter' ) order by col_15,col_19 ) ordered_tbl group by col_19,col_17 for update ; +select group_concat(col_31 order by col_31) aggCol from (select * from tbl_6 where tbl_6.col_30 in ( 'Monday' , 'Monday' , 'Saturday' , 'Friday' , 'Monday' , 'Monday' , 'Saturday' , 'Sunday' , 'Thursday' , 'Sunday' , 'Thursday' , 'Wednesday' , null , 'Sunday' , 'Monday' ) and tbl_6.col_32 >= 'gold' order by col_30 ) ordered_tbl group by col_33 for update ; +select /*+ agg_to_cop() stream_agg() */ bit_xor(col_18) aggCol from (select * from tbl_3 where (col_15, col_19) in (('SPRING', 'Magazine'), ('WINTER', 'Newsletter'), ('SUMMER', 'Newspaper'), ('SPRING', 'Newspaper')) order by col_15,col_19 ) ordered_tbl for update ; +select * from tbl_1 where tbl_1.col_8 <= 'SPRING' and tbl_1.col_9 = 'copper' ; +select /*+ agg_to_cop() stream_agg() */ avg(col_6) aggCol from (select * from tbl_1 where tbl_1.col_8 >= 'SPRING' order by _tidb_rowid ) ordered_tbl for update ; +select col_17 from tbl_5 where tbl_5.col_17 in ( 'Alice' , 'David' ) for update ; +select bit_or(col_38) aggCol from (select * from tbl_0 where tbl_0.col_4 in ( 'silver' , 'gold' , null , 'copper' , null , 'copper' , 'bronze' , 'gold' , 'gold' ) order by col_3 ) ordered_tbl ; +select /*+ */ tbl_6.col_32, tbl_6.col_31, tbl_6.col_33, tbl_6.col_30 , tbl_0.col_4 from tbl_6 join tbl_0 ; +select col_31 from tbl_6 where tbl_6.col_33 < 'Friday' for update ; +select col_18,col_15,col_17,col_16 from tbl_3 where (col_17 = 'Alice' and col_18 = 'copper') or (col_17 = 'David' and col_18 = 'gold') or (col_17 = 'Alice' and col_18 = 'silver') ; +select approx_percentile(col_17, 58) aggCol from (select * from tbl_3 where tbl_3.col_18 in ( 'bronze' ) order by col_15,col_19 ) ordered_tbl for update ; +select tbl_3.col_18, tbl_3.col_15 , tbl_1.* from tbl_3 join tbl_1 on col_15 > col_7 where tbl_3.col_16 in ( 'DIME' , 'PENNY' ) ; +select col_21 from tbl_4 where (col_23) in (('FALL'), ('FALL'), ('SPRING'), ('SPRING')) ; +select /*+ agg_to_cop() stream_agg() */ stddev_pop(distinct col_14) aggCol from (select * from tbl_2 where tbl_2.col_14 >= 'SUMMER' order by col_12 ) ordered_tbl group by col_14,col_11,col_10 ; +select * from tbl_2 where tbl_2.col_12 >= 'Charlie' or tbl_2.col_12 > 'Alice' for update ; +select /*+ INL_JOIN( tbl_6 , tbl_0 ) */ tbl_6.* from tbl_6 where col_31 in ( select col_4 from tbl_0 where tbl_6.col_31 > 'Wednesday' ) ; +select col_10,col_36 from tbl_2 where tbl_2.col_14 <> 'WINTER' ; +select /*+ hash_agg() */ json_objectagg(col_38,col_3) aggCol from (select * from tbl_0 where (col_3) in (('SUMMER'), ('SPRING'), ('WINTER'), ('FALL')) order by col_3 ) ordered_tbl group by col_2 ; +select approx_count_distinct(col_19) aggCol from (select * from tbl_5 where tbl_5.col_19 != 'Magazine' order by col_15,col_19 ) ordered_tbl for update ; +select /*+ hash_agg() */ bit_and(col_10) aggCol from (select * from tbl_2 where tbl_2.col_11 <> 'Alice' and tbl_2.col_12 < 'Bob' and tbl_2.col_14 > 'FALL' order by col_12 ) ordered_tbl for update ; +select /*+ */ tbl_6.* , tbl_5.col_16 from tbl_6 join tbl_5 ; +select /*+ agg_to_cop() stream_agg() */ stddev_samp(col_11) aggCol from (select * from tbl_2 where tbl_2.col_12 in ( 'Bob' , 'David' ) order by col_12 ) ordered_tbl group by col_10,col_12 for update ; +select /*+ HASH_JOIN( tbl_2 , tbl_0 ) */ tbl_2.col_10 , tbl_0.col_2, tbl_0.col_4, tbl_0.col_38 from tbl_2 left join tbl_0 on col_14 < col_4 or col_12 <> col_2 where tbl_0.col_4 in ( 'bronze' , 'bronze' ) ; +select /*+ hash_agg() */ count(col_4) aggCol from (select * from tbl_0 where tbl_0.col_38 in ( 'Newspaper' , 'Newspaper' ) order by _tidb_rowid ) ordered_tbl group by col_3,col_4,col_2,col_0,col_38 for update ; +select * from tbl_2 where tbl_2.col_11 >= 'Bob' for update ; +select tbl_6.* from tbl_6 where col_31 in ( select col_30 from tbl_6 where tbl_6.col_30 >= 'Sunday' ) ; +select col_0,col_4 from tbl_0 where tbl_0.col_38 in ( 'Newsletter' , 'Newspaper' , 'Newspaper' , 'Newsletter' , 'Newspaper' ) or tbl_0.col_0 in ( 'Tuesday' , 'Friday' , 'Tuesday' , 'Wednesday' , 'Sunday' , 'Wednesday' , 'Monday' , 'Friday' , 'Wednesday' , 'Friday' , 'Monday' , 'Monday' , 'Tuesday' ) for update ; +select min(col_38) aggCol from (select * from tbl_0 where tbl_0.col_3 in ( 'WINTER' ) order by _tidb_rowid ) ordered_tbl for update ; +select tbl_0.col_38 , tbl_6.* from tbl_0 join tbl_6 on col_38 < col_31 where tbl_6.col_31 in ( 'Thursday' , 'Friday' ) ; +select json_objectagg(col_8,col_7) aggCol from (select * from tbl_1 where tbl_1.col_5 in ( 'copper' ) or (col_7 = 'Bob' and col_5 = 'bronze' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Magazine') or (col_7 = 'Bob' and col_5 = 'bronze' and col_8 = 'SPRING' and col_9 = 'copper' and col_6 = 'Book') or (col_7 = 'Alice' and col_5 = 'gold' and col_8 = 'WINTER' and col_9 = 'bronze' and col_6 = 'Newsletter') order by _tidb_rowid ) ordered_tbl for update ; +select tbl_6.col_33, tbl_6.col_30, tbl_6.col_31 , tbl_4.col_20, tbl_4.col_24, tbl_4.col_22 from tbl_6 left join tbl_4 on col_30 <= col_20 or col_33 <> col_20 where tbl_4.col_24 in ( 'copper' , 'gold' , 'bronze' , 'gold' ) ; +select /*+ hash_agg() */ bit_and(col_6) aggCol from (select * from tbl_1 where tbl_1.col_6 = 'Book' order by _tidb_rowid ) ordered_tbl group by col_6 for update ; +select col_30,col_31 from tbl_6 where tbl_6.col_31 in ( 'Wednesday' , 'Wednesday' , 'Saturday' , 'Sunday' , 'Thursday' , 'Wednesday' , 'Tuesday' ) and tbl_6.col_31 in ( 'Saturday' , 'Tuesday' ) ; +select tbl_0.col_38 , tbl_3.* from tbl_0 join tbl_3 on col_2 != col_15 and col_2 = col_17 or col_3 < col_16 or col_38 = col_19 where tbl_3.col_35 in ( 'Newspaper' ) ; +select * from tbl_3 where tbl_3.col_17 in ( 'Alice' , 'Charlie' , 'David' , 'Charlie' , 'David' , 'Charlie' , 'Bob' , 'Alice' , 'David' , 'David' ) or (col_17, col_18) in (('David', 'silver'), ('Charlie', 'bronze'), ('David', 'silver'), ('Alice', 'gold')) ; +select col_16 from tbl_5 where (col_15 = 'WINTER' and col_19 = 'Magazine') or (col_15 = 'SUMMER' and col_19 = 'Book') or (col_15 = 'FALL' and col_19 = 'Magazine') or (col_15 = 'SUMMER' and col_19 = 'Newspaper') ; +select tbl_3.* from tbl_3 where col_17 in ( select col_17 from tbl_5 where tbl_5.col_18 != 'bronze' ) ; +select /*+ MERGE_JOIN( tbl_5 , tbl_2 ) */ tbl_5.* , tbl_2.* from tbl_5 join tbl_2 ; +select /*+ agg_to_cop() hash_agg() */ var_pop(col_33) aggCol from (select * from tbl_6 where tbl_6.col_33 in ( 'Friday' , 'Tuesday' , 'Wednesday' , 'Monday' , 'Sunday' ) order by col_30 ) ordered_tbl ; +select /*+ agg_to_cop() hash_agg() */ approx_count_distinct(col_33) aggCol from (select * from tbl_6 where tbl_6.col_30 > 'Saturday' and tbl_6.col_31 in ( 'Saturday' ) order by col_30 ) ordered_tbl group by col_33,col_31,col_30 ; +select /*+ INL_JOIN( tbl_0 , tbl_6 ) */ tbl_0.col_0 , tbl_6.col_31 from tbl_0 join tbl_6 ; +select stddev_samp(col_6) aggCol from (select * from tbl_1 where tbl_1.col_5 in ( 'copper' , 'silver' , 'bronze' , 'silver' , 'bronze' , 'copper' , 'gold' , 'silver' , 'bronze' , 'gold' , 'bronze' , 'gold' , 'bronze' , 'bronze' , 'copper' , 'silver' , 'copper' , 'bronze' , 'silver' ) order by _tidb_rowid ) ordered_tbl group by col_9,col_7 ; +select /*+ agg_to_cop() hash_agg() */ var_pop(distinct col_20) aggCol from (select * from tbl_4 where tbl_4.col_22 in ( 'Bob' , null , 'Alice' , 'Alice' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_21 for update ; +select /*+ agg_to_cop() stream_agg() */ var_pop(col_38) aggCol from (select * from tbl_0 where tbl_0.col_38 = 'Newspaper' and tbl_0.col_38 in ( 'Newspaper' , 'Newspaper' ) order by _tidb_rowid ) ordered_tbl group by col_4 ; +select * from tbl_6 where tbl_6.col_30 in ( 'Monday' ) for update ; +select /*+ hash_agg() */ count(col_33) aggCol from (select * from tbl_6 where tbl_6.col_33 in ( 'Friday' , 'Sunday' , 'Sunday' ) or tbl_6.col_31 >= 'Tuesday' order by col_30 ) ordered_tbl group by col_31 for update ; +select /*+ agg_to_cop() */ sum(col_22) aggCol from (select * from tbl_4 where tbl_4.col_22 in ( 'Alice' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_21 ; +select count(distinct col_33) aggCol from (select * from tbl_6 where tbl_6.col_30 in ( 'Tuesday' , 'Sunday' ) order by col_30 ) ordered_tbl for update ; +select /*+ agg_to_cop() hash_agg() */ var_samp(col_37) aggCol from (select * from tbl_5 where tbl_5.col_37 in ( 'SUMMER' ) or tbl_5.col_18 >= 'copper' order by col_15,col_19 ) ordered_tbl group by col_17,col_18,col_37 ; +select col_3 from tbl_0 where tbl_0.col_3 = 'FALL' ; +select col_18 from tbl_3 where tbl_3.col_16 in ( 'QUARTER' , 'QUARTER' , 'QUARTER' , 'QUARTER' , 'NICKLE' , 'PENNY' , 'DIME' , 'NICKLE' , 'QUARTER' , 'QUARTER' , 'DIME' , 'QUARTER' , 'QUARTER' , 'NICKLE' , 'NICKLE' ) and tbl_3.col_40 in ( 'PENNY' , 'PENNY' , 'PENNY' ) ; +select * from tbl_5 where tbl_5.col_19 >= 'Newsletter' for update ; +select /*+ */ tbl_0.col_0, tbl_0.col_3 , tbl_6.* from tbl_0 join tbl_6 ; +select /*+ hash_agg() */ group_concat(col_5 order by col_5) aggCol from (select * from tbl_1 where tbl_1.col_8 in ( 'FALL' , 'SUMMER' , 'SUMMER' , 'SPRING' ) order by _tidb_rowid ) ordered_tbl group by col_5 ; +select * from tbl_4 where tbl_4.col_23 <= 'SUMMER' for update ; +select /*+ stream_agg() */ var_pop(col_17) aggCol from (select * from tbl_5 where tbl_5.col_19 < 'Newsletter' order by _tidb_rowid ) ordered_tbl group by col_37 ; +select /*+ stream_agg() */ var_pop(col_17) aggCol from (select * from tbl_3 where tbl_3.col_40 in ( 'PENNY' , 'QUARTER' , 'PENNY' ) order by col_15,col_19 ) ordered_tbl ; +select /*+ hash_agg() */ bit_xor(col_19) aggCol from (select * from tbl_5 where tbl_5.col_37 = 'SPRING' order by _tidb_rowid ) ordered_tbl group by col_19 ; +select /*+ agg_to_cop() hash_agg() */ var_samp(col_19) aggCol from (select * from tbl_5 where tbl_5.col_18 <> 'gold' order by _tidb_rowid ) ordered_tbl ; +select /*+ agg_to_cop() stream_agg() */ var_samp(col_37) aggCol from (select * from tbl_5 where tbl_5.col_17 >= 'David' order by _tidb_rowid ) ordered_tbl group by col_17 for update ; +select /*+ HASH_JOIN( tbl_1 , tbl_3 ) */ tbl_1.col_7 from tbl_1 where col_7 in ( select col_35 from tbl_3 where tbl_3.col_15 in ( 'SPRING' , 'WINTER' , 'WINTER' , 'FALL' , 'SPRING' , 'WINTER' , 'WINTER' ) ) ; +select * from tbl_2 where tbl_2.col_11 <> 'Bob' ; +select /*+ */ tbl_1.col_5, tbl_1.col_7 , tbl_1.* from tbl_1 join tbl_1 ; +select tbl_5.col_19, tbl_5.col_17, tbl_5.col_37, tbl_5.col_18 , tbl_1.col_9, tbl_1.col_6, tbl_1.col_5, tbl_1.col_7 from tbl_5 join tbl_1 on col_19 > col_5 where tbl_1.col_6 <> 'Magazine' ; +select col_22,col_21 from tbl_4 where (col_20 = 'WINTER' and col_22 = 'Alice' and col_21 = 'Newsletter' and col_23 = 'SPRING' and col_24 = 'gold') ; +select /*+ INL_MERGE_JOIN( tbl_5 , tbl_4 ) */ tbl_5.col_19, tbl_5.col_18, tbl_5.col_17 , tbl_4.* from tbl_5 right join tbl_4 on col_19 <> col_23 or col_18 <= col_21 where tbl_4.col_23 < 'WINTER' ; +select /*+ INL_JOIN( tbl_0 , tbl_5 ) */ tbl_0.* , tbl_5.* from tbl_0 join tbl_5 ; +select * from tbl_4 where (col_20 = 'SPRING' and col_22 = 'Bob' and col_21 = 'Magazine' and col_23 = 'SPRING' and col_24 = 'silver') or (col_20 = 'SPRING' and col_22 = 'Alice' and col_21 = 'Magazine' and col_23 = 'FALL' and col_24 = 'silver') or (col_20 = 'FALL' and col_22 = 'Charlie' and col_21 = 'Newspaper' and col_23 = 'WINTER' and col_24 = 'copper') for update ; +select tbl_6.col_30 from tbl_6 where col_30 in ( select col_5 from tbl_1 where (col_8) in (('SUMMER')) ) ; +select col_10 from tbl_2 where (col_12) in (('Charlie')) for update ; +select /*+ agg_to_cop() stream_agg() */ bit_xor(col_2) aggCol from (select * from tbl_0 where tbl_0.col_0 in ( 'Wednesday' , 'Friday' , 'Wednesday' , 'Monday' , 'Monday' , 'Saturday' , 'Wednesday' , 'Tuesday' ) or tbl_0.col_0 > 'Monday' order by _tidb_rowid ) ordered_tbl group by col_0,col_4,col_3,col_2 for update ; +select tbl_1.* , tbl_1.col_7, tbl_1.col_9 from tbl_1 join tbl_1 on col_5 = col_7 where tbl_1.col_5 in ( 'gold' ) and tbl_1.col_5 < 'bronze' ; +select col_9,col_6,col_5,col_7 from tbl_1 where tbl_1.col_6 in ( 'Newspaper' ) or tbl_1.col_7 in ( 'Alice' ) for update ; +select /*+ agg_to_cop() stream_agg() */ max(distinct col_23) aggCol from (select * from tbl_4 where tbl_4.col_22 in ( 'Bob' , 'Alice' , 'Alice' , 'Alice' , 'David' ) or tbl_4.col_23 in ( 'WINTER' , 'FALL' , 'FALL' , 'SUMMER' , 'SPRING' , 'SUMMER' , 'FALL' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_20 ; +select /*+ */ tbl_6.col_33, tbl_6.col_31 , tbl_5.col_18 from tbl_6 join tbl_5 ; +select /*+ agg_to_cop() stream_agg() */ var_samp(distinct col_31) aggCol from (select * from tbl_6 where tbl_6.col_33 < 'Tuesday' or tbl_6.col_31 in ( 'Thursday' , 'Saturday' , 'Tuesday' ) and tbl_6.col_33 in ( 'Wednesday' ) order by col_30 ) ordered_tbl ; +select /*+ INL_JOIN( tbl_1 , tbl_4 ) */ tbl_1.* from tbl_1 where col_6 in ( select col_20 from tbl_4 where tbl_4.col_21 = 'Newspaper' ) ; +select * from tbl_2 where tbl_2.col_41 in ( 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newsletter' , 'Newsletter' ) or tbl_2.col_41 in ( 'Newspaper' , 'Newspaper' , 'Book' , 'Newspaper' ) for update ; +select /*+ agg_to_cop() hash_agg() */ var_pop(col_33) aggCol from (select * from tbl_6 where tbl_6.col_33 in ( 'Wednesday' , 'Saturday' ) order by col_30 ) ordered_tbl group by col_31 ; +select col_8 from tbl_1 where tbl_1.col_6 in ( 'Book' , 'Newsletter' , 'Magazine' , 'Book' , 'Newspaper' , 'Newspaper' , 'Magazine' , 'Newsletter' ) ; +select * from tbl_5 where tbl_5.col_18 in ( 'gold' , 'copper' , 'bronze' , 'bronze' , 'bronze' , 'gold' , 'copper' ) ; +select * from tbl_6 where (col_30) in (('Saturday'), ('Sunday'), ('Friday')) for update ; +select /*+ stream_agg() */ count(col_7) aggCol from (select * from tbl_1 where tbl_1.col_7 in ( 'Alice' , 'Alice' , 'Bob' , 'David' , 'David' , 'Charlie' , 'David' , 'David' ) order by _tidb_rowid ) ordered_tbl group by col_9 for update ; +select tbl_6.* from tbl_6 where col_43 in ( select col_10 from tbl_2 where tbl_6.col_30 != 'Thursday' ) ; +select /*+ */ tbl_5.col_19 , tbl_3.col_19, tbl_3.col_40 from tbl_5 join tbl_3 ; +select /*+ agg_to_cop() stream_agg() */ avg(distinct col_19) aggCol from (select * from tbl_5 where tbl_5.col_17 >= 'Alice' order by _tidb_rowid ) ordered_tbl group by col_19 ; +select /*+ hash_agg() */ avg(distinct col_5) aggCol from (select * from tbl_1 where tbl_1.col_5 < 'bronze' order by _tidb_rowid ) ordered_tbl group by col_8,col_9,col_7,col_6 for update ; +select col_5,col_8 from tbl_1 where tbl_1.col_7 = 'Bob' ; +select /*+ stream_agg() */ max(col_11) aggCol from (select * from tbl_2 where tbl_2.col_12 in ( 'Bob' , 'Alice' , 'David' ) order by _tidb_rowid ) ordered_tbl ; +select tbl_3.* from tbl_3 where col_42 in ( select col_43 from tbl_6 where tbl_6.col_31 in ( 'Wednesday' , 'Thursday' , 'Tuesday' , 'Friday' ) and tbl_3.col_15 >= 'SPRING' and tbl_6.col_43 in ( 'Wednesday' , 'Wednesday' ) and tbl_6.col_31 > 'Monday' ) ; +select /*+ stream_agg() */ approx_count_distinct(col_22) aggCol from (select * from tbl_4 where tbl_4.col_24 in ( 'silver' , 'copper' , 'bronze' , 'gold' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_23,col_20,col_24,col_22,col_21 ; +select /*+ MERGE_JOIN( tbl_2 , tbl_3 ) */ tbl_2.* , tbl_3.col_40 from tbl_2 join tbl_3 ; +select /*+ stream_agg() */ min(col_10) aggCol from (select * from tbl_2 where (col_12, col_10, col_11) = ('Charlie', 'Tuesday', 'Alice') order by _tidb_rowid ) ordered_tbl group by col_11,col_12 for update ; +select col_24 from tbl_4 where (col_23 = 'WINTER') or (col_23 = 'SPRING') for update ; +select /*+ INL_JOIN( tbl_6 , tbl_2 ) */ tbl_6.col_31 , tbl_2.col_12, tbl_2.col_10, tbl_2.col_11 from tbl_6 join tbl_2 ; +select /*+ agg_to_cop() hash_agg() */ group_concat(col_9 order by col_9) aggCol from (select * from tbl_1 where tbl_1.col_7 in ( 'Alice' , 'David' ) order by _tidb_rowid ) ordered_tbl ; +select tbl_1.* , tbl_4.col_21, tbl_4.col_24, tbl_4.col_22, tbl_4.col_20, tbl_4.col_23 from tbl_1 left join tbl_4 on col_5 <= col_21 where tbl_4.col_23 in ( 'SPRING' ) and (col_7 = 'David' and col_5 = 'copper' and col_8 = 'SUMMER' and col_9 = 'copper' and col_6 = 'Book') or (col_7 = 'David' and col_5 = 'copper' and col_8 = 'SUMMER' and col_9 = 'copper' and col_6 = 'Magazine') or (col_7 = 'Alice' and col_5 = 'copper' and col_8 = 'WINTER' and col_9 = 'silver' and col_6 = 'Book') ; +select /*+ agg_to_cop() */ approx_percentile(col_18, 65) aggCol from (select * from tbl_3 where (col_17, col_18) = ('David', 'silver') or (col_17, col_18) = ('Charlie', 'gold') or (col_17, col_18) = ('Alice', 'copper') or (col_17, col_18) = ('Charlie', 'silver') order by col_15,col_19 ) ordered_tbl group by col_19,col_42,col_18,col_35,col_17 for update ; +select * from tbl_4 where tbl_4.col_20 in ( 'SPRING' , 'SUMMER' ) ; +select bit_xor(col_12) aggCol from (select * from tbl_2 where tbl_2.col_12 in ( 'Bob' , 'Charlie' , 'Charlie' , 'Charlie' ) order by _tidb_rowid ) ordered_tbl for update ; +select col_0,col_4,col_2 from tbl_0 where tbl_0.col_0 in ( 'Monday' , 'Thursday' , 'Thursday' , 'Wednesday' ) for update ; +select /*+ hash_agg() */ min(distinct col_0) aggCol from (select * from tbl_0 where tbl_0.col_0 in ( 'Friday' , 'Tuesday' , 'Saturday' , 'Friday' , 'Tuesday' ) order by _tidb_rowid ) ordered_tbl group by col_3,col_2,col_4 for update ; +select * from tbl_1 where (col_7 = 'David' and col_5 = 'silver' and col_8 = 'FALL' and col_9 = 'copper' and col_6 = 'Magazine') or (col_7 = 'Bob' and col_5 = 'gold' and col_8 = 'WINTER' and col_9 = 'gold' and col_6 = 'Newspaper') ; +select group_concat(col_23 order by col_23) aggCol from (select * from tbl_4 where tbl_4.col_22 in ( 'Alice' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_22,col_21,col_20 ; +select /*+ agg_to_cop() */ stddev_pop(col_37) aggCol from (select * from tbl_5 where tbl_5.col_19 >= 'Newspaper' and tbl_5.col_18 in ( 'bronze' , 'bronze' , 'gold' , 'copper' , 'gold' , 'copper' ) order by _tidb_rowid ) ordered_tbl group by col_37,col_17,col_18,col_19 ; +select * from tbl_5 where tbl_5.col_37 in ( 'FALL' , 'FALL' ) ; +select * from tbl_4 where tbl_4.col_24 = 'bronze' or tbl_4.col_22 > 'Charlie' or tbl_4.col_22 in ( 'Alice' , 'Alice' , null , 'Alice' , 'Alice' , 'David' , 'Charlie' , 'Alice' , 'Alice' ) for update ; +select /*+ agg_to_cop() stream_agg() */ stddev_samp(col_2) aggCol from (select * from tbl_0 where tbl_0.col_0 in ( 'Tuesday' , 'Wednesday' , 'Wednesday' , 'Monday' , 'Sunday' , 'Wednesday' , 'Saturday' , 'Monday' , 'Sunday' ) order by _tidb_rowid ) ordered_tbl group by col_3,col_2,col_4,col_45 for update ; +select /*+ hash_agg() */ min(distinct col_18) aggCol from (select * from tbl_5 where tbl_5.col_17 in ( 'David' , 'David' , 'Charlie' , 'Bob' , 'Bob' , 'Alice' , 'Alice' , 'Alice' , 'Charlie' ) order by _tidb_rowid ) ordered_tbl ; +select /*+ agg_to_cop() */ approx_count_distinct(col_0) aggCol from (select * from tbl_0 where tbl_0.col_0 in ( 'Friday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Sunday' , 'Wednesday' ) order by _tidb_rowid ) ordered_tbl ; +select col_17,col_18,col_37 from tbl_5 where tbl_5.col_18 <= 'copper' ; +select /*+ */ tbl_2.* , tbl_6.col_33 from tbl_2 join tbl_6 ; +select /*+ hash_agg() */ bit_xor(col_18) aggCol from (select * from tbl_5 where tbl_5.col_37 != 'SPRING' and tbl_5.col_17 > 'Bob' order by _tidb_rowid ) ordered_tbl ; +select * from tbl_4 where tbl_4.col_23 >= 'SUMMER' for update ; +select /*+ agg_to_cop() stream_agg() */ count(distinct col_37) aggCol from (select * from tbl_5 where tbl_5.col_37 in ( 'WINTER' , 'SUMMER' , 'SUMMER' , 'WINTER' , 'FALL' , 'SPRING' ) or tbl_5.col_17 <> 'David' or tbl_5.col_18 in ( 'silver' , 'copper' , 'gold' , 'copper' , 'gold' ) order by _tidb_rowid ) ordered_tbl group by col_37,col_17,col_18 ; +select tbl_4.* , tbl_4.col_22, tbl_4.col_21 from tbl_4 join tbl_4 on col_24 <= col_22 where tbl_4.col_22 in ( 'Charlie' , 'Alice' , 'David' ) ; +select /*+ agg_to_cop() hash_agg() */ avg(col_8) aggCol from (select * from tbl_1 where tbl_1.col_5 != 'bronze' order by _tidb_rowid ) ordered_tbl for update ; +select col_17,col_37,col_18 from tbl_5 where tbl_5.col_17 <= 'David' ; +select /*+ agg_to_cop() */ bit_or(col_5) aggCol from (select * from tbl_1 where (col_7 = 'Charlie' and col_5 = 'bronze' and col_8 = 'WINTER' and col_9 = 'silver' and col_6 = 'Book') or (col_7 = 'Alice' and col_5 = 'copper' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Book') order by _tidb_rowid ) ordered_tbl group by col_8,col_6 for update ; +select tbl_3.* , tbl_4.* from tbl_3 join tbl_4 on col_19 != col_22 and col_16 > col_24 or col_16 = col_21 and col_15 > col_21 or col_19 < col_24 or col_17 <= col_22 or col_15 > col_21 and col_16 <= col_24 and col_15 < col_23 where tbl_4.col_21 >= 'Newspaper' ; +select /*+ MERGE_JOIN( tbl_1 , tbl_4 ) */ tbl_1.col_6, tbl_1.col_9, tbl_1.col_8, tbl_1.col_7, tbl_1.col_5 , tbl_4.* from tbl_1 join tbl_4 ; +select /*+ hash_agg() */ bit_and(col_37) aggCol from (select * from tbl_5 where tbl_5.col_17 <= 'Charlie' order by _tidb_rowid ) ordered_tbl group by col_17,col_18,col_37 ; +select col_31,col_33 from tbl_6 where (col_30 = 'Monday') or (col_30 = 'Thursday') or (col_30 = 'Sunday') or (col_30 = 'Sunday') ; +select /*+ INL_HASH_JOIN( tbl_6 , tbl_5 ) */ tbl_6.col_33 from tbl_6 where col_31 in ( select col_37 from tbl_5 where tbl_5.col_18 in ( 'copper' , 'bronze' , 'bronze' , 'silver' , 'silver' , 'silver' , 'silver' , 'silver' ) ) ; +select json_objectagg(col_18,col_37) aggCol from (select * from tbl_5 where tbl_5.col_18 <> 'copper' order by _tidb_rowid ) ordered_tbl group by col_17,col_18 ; +select /*+ MERGE_JOIN( tbl_4 , tbl_1 ) */ tbl_4.* , tbl_1.col_5 from tbl_4 join tbl_1 ; +select /*+ stream_agg() */ count(distinct col_37) aggCol from (select * from tbl_5 where tbl_5.col_17 in ( 'Charlie' ) order by _tidb_rowid ) ordered_tbl group by col_17,col_37,col_18 for update ; +select col_19,col_17,col_42,col_16,col_35 from tbl_3 where tbl_3.col_19 in ( 'Magazine' , 'Newsletter' , 'Newspaper' , 'Magazine' , 'Newspaper' , 'Newspaper' , 'Book' ) ; +select /*+ hash_agg() */ min(col_20) aggCol from (select * from tbl_4 where tbl_4.col_20 in ( 'FALL' , 'FALL' , 'WINTER' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_20 for update ; +select * from tbl_5 where tbl_5.col_37 > 'SPRING' for update ; +select * from tbl_1 where tbl_1.col_9 in ( 'copper' , 'bronze' , 'copper' , 'copper' , 'bronze' , 'copper' , 'copper' ) for update ; +select /*+ INL_JOIN( tbl_0 , tbl_1 ) */ tbl_0.* , tbl_1.* from tbl_0 join tbl_1 ; +select /*+ MERGE_JOIN( tbl_3 , tbl_3 ) */ tbl_3.* , tbl_3.* from tbl_3 right join tbl_3 on col_35 = col_40 where (col_15, col_19) in (('SPRING', 'Magazine'), ('FALL', 'Book'), ('WINTER', 'Book'), ('SPRING', 'Magazine')) ; +select /*+ INL_MERGE_JOIN( tbl_4 , tbl_3 ) */ tbl_4.col_22 , tbl_3.* from tbl_4 right join tbl_3 on col_24 < col_17 and col_24 != col_18 or col_23 >= col_18 where (col_17, col_18) = ('Bob', 'silver') or (col_17, col_18) = ('Alice', 'gold') or (col_17, col_18) = ('Bob', 'silver') or (col_17, col_18) = ('Bob', 'copper') ; +select * from tbl_4 where tbl_4.col_20 >= 'WINTER' ; +select /*+ MERGE_JOIN( tbl_1 , tbl_6 ) */ tbl_1.col_9 from tbl_1 where col_6 in ( select col_30 from tbl_6 where tbl_6.col_43 in ( 'Sunday' , 'Saturday' , 'Monday' , 'Thursday' , 'Friday' , 'Sunday' , 'Tuesday' , 'Friday' ) ) ; +select /*+ */ tbl_0.col_2 , tbl_1.col_9 from tbl_0 join tbl_1 ; +select col_30 from tbl_6 where (col_31) in (('Thursday'), ('Tuesday')) ; +select /*+ */ tbl_4.* , tbl_3.* from tbl_4 join tbl_3 ; +select tbl_0.* from tbl_0 where col_0 in ( select col_18 from tbl_5 where tbl_0.col_2 in ( 'NICKLE' , 'NICKLE' ) ) ; +select /*+ MERGE_JOIN( tbl_3 , tbl_0 ) */ tbl_3.col_42, tbl_3.col_40 , tbl_0.col_2 from tbl_3 join tbl_0 ; +select * from tbl_2 where tbl_2.col_10 < 'Wednesday' and tbl_2.col_10 in ( 'Monday' , 'Tuesday' , 'Thursday' , 'Saturday' ) for update ; +select /*+ INL_HASH_JOIN( tbl_1 , tbl_6 ) */ tbl_1.* , tbl_6.* from tbl_1 join tbl_6 ; +select /*+ stream_agg() */ sum(col_23) aggCol from (select * from tbl_4 where tbl_4.col_23 = 'SPRING' and tbl_4.col_23 in ( 'SUMMER' , 'SUMMER' , 'FALL' , 'WINTER' , 'SUMMER' , 'SUMMER' , 'FALL' , 'WINTER' , 'SPRING' , 'WINTER' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl ; +select /*+ stream_agg() */ approx_percentile(col_15, 79) aggCol from (select * from tbl_3 where (col_17 = 'Alice' and col_18 = 'copper') order by col_15,col_19 ) ordered_tbl ; +select /*+ */ tbl_5.* , tbl_0.col_0 from tbl_5 join tbl_0 ; +select /*+ */ tbl_4.* , tbl_6.col_47 from tbl_4 join tbl_6 ; +select stddev_pop(distinct col_21) aggCol from (select * from tbl_4 where tbl_4.col_21 <> 'Book' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select /*+ INL_JOIN( tbl_2 , tbl_4 ) */ tbl_2.* , tbl_4.* from tbl_2 right join tbl_4 on col_12 >= col_23 or col_10 <> col_23 where tbl_4.col_20 != 'SPRING' and tbl_4.col_48 in ( 'bronze' , 'bronze' ) ; +select tbl_0.* , tbl_6.col_47, tbl_6.col_43, tbl_6.col_33 from tbl_0 right join tbl_6 on col_0 >= col_47 or col_4 != col_47 and col_4 < col_47 or col_2 <> col_30 where tbl_6.col_47 in ( 'QUARTER' ) or tbl_6.col_47 >= 'PENNY' and tbl_0.col_45 <= 'WINTER' or tbl_6.col_30 <> 'Wednesday' ; +select /*+ */ tbl_6.* , tbl_5.* from tbl_6 join tbl_5 ; +select tbl_2.col_10, tbl_2.col_12, tbl_2.col_11 from tbl_2 where col_10 in ( select col_18 from tbl_5 where tbl_2.col_12 >= 'Charlie' and tbl_2.col_10 >= 'Saturday' ) ; +select /*+ agg_to_cop() */ bit_or(col_42) aggCol from (select * from tbl_3 where tbl_3.col_17 in ( 'Alice' ) order by col_15,col_19 ) ordered_tbl group by col_18,col_17 for update ; +select * from tbl_4 where tbl_4.col_21 != 'Magazine' ; +select * from tbl_2 where tbl_2.col_10 != 'Tuesday' for update ; +select col_30,col_33 from tbl_6 where tbl_6.col_30 in ( 'Friday' , 'Wednesday' , 'Tuesday' , 'Friday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Sunday' , 'Thursday' , 'Tuesday' , 'Sunday' , 'Friday' , 'Monday' ) or tbl_6.col_31 < 'Sunday' ; +select tbl_4.col_23 , tbl_5.col_18, tbl_5.col_37 from tbl_4 left join tbl_5 on col_24 < col_18 and col_20 >= col_18 where tbl_4.col_48 < 'copper' ; +select /*+ agg_to_cop() */ avg(col_30) aggCol from (select * from tbl_6 where (col_30 = 'Thursday') order by col_30 ) ordered_tbl group by col_33,col_47,col_30 ; +select col_24,col_20,col_21,col_49 from tbl_4 where (col_20, col_22, col_21, col_23, col_24) in (('SPRING', 'David', 'Newsletter', 'FALL', 'bronze'), ('FALL', 'Alice', 'Magazine', 'SPRING', 'gold')) ; +select tbl_3.col_42 from tbl_3 where col_17 in ( select col_10 from tbl_2 where (col_15, col_19) in (('SUMMER', 'Book'), ('SPRING', 'Magazine'), ('FALL', 'Magazine'), ('FALL', 'Book')) ) ; +select * from tbl_5 where tbl_5.col_37 = 'SUMMER' and tbl_5.col_17 in ( 'David' , 'David' , 'Alice' , 'David' , 'David' ) and tbl_5.col_37 in ( 'WINTER' , 'SPRING' , 'SPRING' , 'SPRING' , 'WINTER' ) ; +select tbl_6.col_50 from tbl_6 where col_31 in ( select col_19 from tbl_3 where tbl_6.col_50 in ( 'SUMMER' , 'WINTER' , 'SUMMER' , 'SPRING' , 'FALL' , 'FALL' , 'SPRING' ) ) ; +select * from tbl_6 where tbl_6.col_43 <= 'Saturday' and tbl_6.col_31 in ( 'Monday' ) or tbl_6.col_31 >= 'Wednesday' for update ; +select stddev_pop(col_43) aggCol from (select * from tbl_6 where tbl_6.col_43 in ( 'Sunday' , 'Thursday' , 'Saturday' ) order by col_30 ) ordered_tbl group by col_31 ; +select /*+ INL_MERGE_JOIN( tbl_3 , tbl_3 ) */ tbl_3.col_15 from tbl_3 where col_17 in ( select col_15 from tbl_3 where tbl_3.col_42 in ( 'NICKLE' , 'QUARTER' , 'NICKLE' , 'PENNY' , 'NICKLE' , 'PENNY' , 'PENNY' , 'DIME' , 'PENNY' , 'PENNY' , 'PENNY' , 'PENNY' , 'PENNY' , 'PENNY' , 'PENNY' , 'DIME' , 'PENNY' ) ) ; +select /*+ INL_HASH_JOIN( tbl_5 , tbl_2 ) */ tbl_5.* from tbl_5 where col_37 in ( select col_12 from tbl_2 where tbl_5.col_37 != 'FALL' ) ; +select /*+ INL_MERGE_JOIN( tbl_5 , tbl_4 ) */ tbl_5.col_17, tbl_5.col_18 , tbl_4.* from tbl_5 join tbl_4 ; +select * from tbl_3 where (col_17 = 'Charlie' and col_18 = 'copper') or (col_17 = 'Bob' and col_18 = 'gold') ; +select /*+ INL_MERGE_JOIN( tbl_2 , tbl_2 ) */ tbl_2.* , tbl_2.* from tbl_2 join tbl_2 ; +select * from tbl_6 where tbl_6.col_31 = 'Sunday' ; +select col_10,col_12 from tbl_2 where tbl_2.col_11 in ( 'Alice' ) for update ; +select /*+ agg_to_cop() hash_agg() */ bit_xor(col_31) aggCol from (select * from tbl_6 where (col_30) = ('Wednesday') or (col_30) = ('Wednesday') or (col_30) = ('Sunday') or (col_30) = ('Sunday') order by col_30 ) ordered_tbl group by col_30,col_50 ; +select tbl_1.* , tbl_4.col_24 from tbl_1 left join tbl_4 on col_9 <> col_48 or col_6 <= col_22 and col_5 <= col_24 and col_6 = col_48 and col_6 = col_20 and col_6 > col_23 where tbl_1.col_8 = 'SPRING' and tbl_4.col_48 > 'copper' or tbl_4.col_20 != 'WINTER' ; +select * from tbl_0 where tbl_0.col_4 in ( 'silver' , 'copper' , 'bronze' , 'silver' ) ; +select approx_count_distinct(col_7) aggCol from (select * from tbl_1 where tbl_1.col_6 in ( null , 'Book' , 'Magazine' ) order by _tidb_rowid ) ordered_tbl group by col_9 for update ; +select /*+ agg_to_cop() */ count(col_15) aggCol from (select * from tbl_3 where tbl_3.col_19 in ( 'Book' ) or (col_17, col_18) = ('Charlie', 'copper') or (col_17, col_18) = ('Charlie', 'copper') or (col_17, col_18) = ('David', 'gold') or (col_17, col_18) = ('Bob', 'bronze') order by col_15,col_19 ) ordered_tbl ; +select /*+ hash_agg() */ approx_percentile(col_10, 51) aggCol from (select * from tbl_2 where tbl_2.col_11 in ( 'David' , 'Charlie' , 'Bob' , 'David' , 'Bob' ) order by _tidb_rowid ) ordered_tbl group by col_11,col_10 for update ; +select /*+ stream_agg() */ bit_xor(col_2) aggCol from (select * from tbl_0 where tbl_0.col_2 in ( 'DIME' ) order by _tidb_rowid ) ordered_tbl group by col_2 ; +select /*+ agg_to_cop() */ bit_xor(col_8) aggCol from (select * from tbl_1 where (col_7 = 'Charlie' and col_5 = 'bronze' and col_8 = 'FALL' and col_9 = 'bronze' and col_6 = 'Newsletter') or (col_7 = 'David' and col_5 = 'copper' and col_8 = 'FALL' and col_9 = 'bronze' and col_6 = 'Magazine') or (col_7 = 'David' and col_5 = null and col_8 = 'SPRING' and col_9 = 'silver' and col_6 = 'Newsletter') order by _tidb_rowid ) ordered_tbl ; +select /*+ MERGE_JOIN( tbl_2 , tbl_5 ) */ tbl_2.col_12 from tbl_2 where col_10 in ( select col_17 from tbl_5 where tbl_2.col_10 != 'Sunday' or tbl_5.col_18 in ( 'gold' , 'copper' ) ) ; +select /*+ */ tbl_6.col_43, tbl_6.col_31, tbl_6.col_50, tbl_6.col_30, tbl_6.col_33 , tbl_1.* from tbl_6 join tbl_1 ; +select approx_percentile(col_7, 50) aggCol from (select * from tbl_1 where (col_7 = 'Bob' and col_5 = 'bronze' and col_8 = 'FALL' and col_9 = 'gold' and col_6 = 'Book') or (col_7 = 'Alice' and col_5 = 'copper' and col_8 = 'FALL' and col_9 = 'silver' and col_6 = 'Newspaper') or (col_7 = 'Bob' and col_5 = 'silver' and col_8 = 'SUMMER' and col_9 = 'copper' and col_6 = 'Book') or (col_7 = 'Charlie' and col_5 = 'gold' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Newsletter') order by _tidb_rowid ) ordered_tbl group by col_6,col_5 for update ; +select /*+ INL_JOIN( tbl_4 , tbl_5 ) */ tbl_4.* , tbl_5.col_17, tbl_5.col_18 from tbl_4 right join tbl_5 on col_23 > col_37 and col_22 <> col_37 and col_24 >= col_37 or col_24 = col_37 where tbl_4.col_21 in ( 'Newspaper' , 'Newsletter' , 'Magazine' , 'Magazine' ) and tbl_4.col_22 > 'Alice' and tbl_4.col_48 > 'bronze' ; +select /*+ HASH_JOIN( tbl_3 , tbl_2 ) */ tbl_3.* from tbl_3 where col_15 in ( select col_10 from tbl_2 where tbl_3.col_18 > 'copper' and tbl_3.col_40 >= 'PENNY' ) ; +select /*+ agg_to_cop() stream_agg() */ stddev_pop(distinct col_42) aggCol from (select * from tbl_3 where tbl_3.col_17 != 'Alice' or (col_15 = 'FALL' and col_19 = 'Magazine') or (col_15 = 'WINTER' and col_19 = 'Newspaper') order by col_15,col_19 ) ordered_tbl group by col_15,col_40 ; +select col_30 from tbl_6 where tbl_6.col_33 in ( 'Friday' , 'Sunday' , 'Friday' , 'Sunday' ) ; +select /*+ agg_to_cop() */ var_samp(distinct col_0) aggCol from (select * from tbl_0 where tbl_0.col_2 <> 'PENNY' order by _tidb_rowid ) ordered_tbl for update ; +select * from tbl_4 where tbl_4.col_22 in ( 'Bob' , 'Bob' , 'Bob' , 'Bob' , 'Alice' ) and tbl_4.col_48 in ( 'gold' ) or (col_24, col_23) in (('bronze', 'SPRING'), ('copper', 'WINTER'), ('gold', 'SUMMER'), ('silver', 'WINTER')) ; +select tbl_2.col_10 , tbl_6.* from tbl_2 right join tbl_6 on col_10 <> col_30 or col_10 = col_43 and col_10 = col_43 where tbl_6.col_50 in ( 'FALL' , 'FALL' , 'WINTER' , 'SUMMER' , 'SPRING' , 'SUMMER' , 'FALL' ) ; +select col_4,col_45 from tbl_0 where tbl_0.col_0 in ( 'Thursday' , 'Thursday' , 'Saturday' , 'Friday' ) or tbl_0.col_45 > 'WINTER' for update ; +select * from tbl_2 where tbl_2.col_11 = 'David' and tbl_2.col_11 <= 'Alice' ; +select /*+ HASH_JOIN( tbl_4 , tbl_4 ) */ tbl_4.* , tbl_4.* from tbl_4 join tbl_4 ; +select col_37 from tbl_5 where tbl_5.col_18 in ( 'gold' , 'bronze' , 'silver' , 'silver' , 'silver' , 'bronze' ) and tbl_5.col_17 != 'Charlie' for update ; +select tbl_6.col_50, tbl_6.col_33 , tbl_2.col_11 from tbl_6 join tbl_2 on col_31 != col_10 and col_50 <> col_10 and col_43 = col_51 where tbl_2.col_11 >= 'Bob' ; +select * from tbl_4 where (col_22, col_23, col_20, col_21, col_24) in (('Charlie', 'SUMMER', 'FALL', 'Newsletter', 'copper'), ('Alice', 'FALL', 'SUMMER', 'Newsletter', 'silver'), ('Bob', 'FALL', 'SPRING', 'Newsletter', 'bronze'), ('Bob', 'FALL', 'SPRING', 'Magazine', 'gold')) ; +select /*+ agg_to_cop() hash_agg() */ bit_and(col_33) aggCol from (select * from tbl_6 where tbl_6.col_50 in ( 'FALL' , 'SUMMER' , 'WINTER' , 'WINTER' , 'SPRING' , 'WINTER' , 'WINTER' , 'WINTER' ) order by col_30 ) ordered_tbl group by col_31 for update ; +select /*+ agg_to_cop() stream_agg() */ count(distinct col_30) aggCol from (select * from tbl_6 where tbl_6.col_31 >= 'Sunday' order by col_30 ) ordered_tbl group by col_33,col_30,col_43,col_31 ; +select /*+ MERGE_JOIN( tbl_1 , tbl_6 ) */ tbl_1.* , tbl_6.* from tbl_1 join tbl_6 ; +select * from tbl_4 where tbl_4.col_23 in ( 'SUMMER' , 'SPRING' ) for update ; +select col_10 from tbl_2 where tbl_2.col_51 in ( 'gold' , 'copper' , 'copper' , 'gold' , 'silver' , 'copper' , 'copper' , 'copper' , 'bronze' , 'copper' ) for update ; +select col_30,col_31 from tbl_6 where (col_30) = ('Monday') or (col_30) = ('Sunday') or (col_30) = ('Friday') or (col_30) = ('Friday') for update ; +select * from tbl_4 where tbl_4.col_49 <= 'PENNY' for update ; +select * from tbl_6 where tbl_6.col_30 in ( 'Tuesday' , null , 'Wednesday' ) for update ; +select /*+ agg_to_cop() hash_agg() */ max(col_8) aggCol from (select * from tbl_1 where tbl_1.col_9 in ( 'gold' , 'bronze' ) order by _tidb_rowid ) ordered_tbl group by col_6,col_9 ; +select /*+ hash_agg() */ var_samp(distinct col_15) aggCol from (select * from tbl_3 where (col_17 = 'Charlie' and col_18 = 'bronze') or (col_17 = 'Bob' and col_18 = 'gold') or (col_17 = 'Alice' and col_18 = 'gold') order by col_15,col_19 ) ordered_tbl group by col_15 for update ; +select /*+ agg_to_cop() */ bit_or(col_33) aggCol from (select * from tbl_6 where tbl_6.col_31 in ( 'Saturday' , 'Monday' ) order by col_30 ) ordered_tbl group by col_33,col_43 ; +select /*+ agg_to_cop() */ approx_percentile(col_24, 83) aggCol from (select * from tbl_4 where tbl_4.col_22 <= 'Alice' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_21,col_20,col_49,col_22 ; +select /*+ agg_to_cop() stream_agg() */ var_pop(distinct col_51) aggCol from (select * from tbl_2 where tbl_2.col_10 <= 'Tuesday' order by _tidb_rowid ) ordered_tbl group by col_51 for update ; +select /*+ agg_to_cop() hash_agg() */ var_pop(col_45) aggCol from (select * from tbl_0 where tbl_0.col_2 <= 'PENNY' order by _tidb_rowid ) ordered_tbl for update ; +select col_18 from tbl_3 where tbl_3.col_16 in ( 'PENNY' , 'DIME' , 'PENNY' , 'DIME' , 'NICKLE' , 'QUARTER' , 'NICKLE' ) for update ; +select col_2,col_0,col_45 from tbl_0 where tbl_0.col_0 < 'Tuesday' and tbl_0.col_45 in ( 'WINTER' , 'WINTER' ) for update ; +select group_concat(distinct col_19 order by col_19) aggCol from (select * from tbl_3 where tbl_3.col_42 <> 'PENNY' order by col_15,col_19 ) ordered_tbl for update ; +select * from tbl_4 where (col_24 = 'gold' and col_23 = 'FALL') or (col_24 = 'copper' and col_23 = 'WINTER') or (col_24 = 'copper' and col_23 = 'FALL') or (col_24 = 'silver' and col_23 = 'SUMMER') ; +select col_8,col_9 from tbl_1 where tbl_1.col_8 < 'SPRING' for update ; +select * from tbl_4 where (col_22, col_23, col_20, col_21, col_24) in ((null, 'WINTER', 'SPRING', 'Magazine', 'bronze'), ('David', 'SPRING', 'FALL', 'Newsletter', 'silver'), ('David', 'SPRING', 'SPRING', 'Book', 'copper')) for update ; +select /*+ MERGE_JOIN( tbl_2 , tbl_0 ) */ tbl_2.col_11 , tbl_0.col_2 from tbl_2 join tbl_0 ; +select /*+ agg_to_cop() stream_agg() */ var_samp(col_43) aggCol from (select * from tbl_6 where tbl_6.col_33 in ( 'Thursday' , 'Monday' , 'Tuesday' , 'Friday' ) order by col_30 ) ordered_tbl ; +select /*+ agg_to_cop() stream_agg() */ bit_xor(col_37) aggCol from (select * from tbl_5 where tbl_5.col_37 in ( 'FALL' , 'SUMMER' , 'FALL' , 'FALL' , 'FALL' , 'SPRING' , 'FALL' , 'FALL' , 'SPRING' ) order by _tidb_rowid ) ordered_tbl group by col_18 for update ; +select * from tbl_1 where tbl_1.col_6 > 'Newspaper' and tbl_1.col_5 <> 'silver' ; +select col_18,col_17,col_37 from tbl_5 where tbl_5.col_37 != 'SPRING' for update ; +select /*+ agg_to_cop() stream_agg() */ count(col_40) aggCol from (select * from tbl_3 where tbl_3.col_40 in ( 'PENNY' ) and tbl_3.col_40 <> 'PENNY' or (col_15 = null and col_19 = 'Book') or (col_15 = 'SUMMER' and col_19 = 'Book') order by col_15,col_19 ) ordered_tbl group by col_16 for update ; +select * from tbl_4 where (col_23 = 'WINTER') or (col_23 = 'SPRING') or (col_23 = 'SUMMER') for update ; +select * from tbl_2 where tbl_2.col_12 <> 'Charlie' for update ; +select /*+ agg_to_cop() */ var_samp(col_37) aggCol from (select * from tbl_5 where tbl_5.col_17 >= 'David' order by _tidb_rowid ) ordered_tbl group by col_37,col_18 for update ; +select tbl_3.col_17, tbl_3.col_16 , tbl_0.col_45 from tbl_3 join tbl_0 on col_42 > col_45 where tbl_3.col_15 = 'SUMMER' ; +select /*+ INL_JOIN( tbl_4 , tbl_4 ) */ tbl_4.col_49, tbl_4.col_21 , tbl_4.col_49, tbl_4.col_23, tbl_4.col_20, tbl_4.col_21 from tbl_4 join tbl_4 on col_23 < col_22 where (col_20) = ('SPRING') or (col_20) = ('FALL') ; +select /*+ agg_to_cop() hash_agg() */ avg(col_18) aggCol from (select * from tbl_5 where tbl_5.col_37 = 'FALL' order by _tidb_rowid ) ordered_tbl for update ; +select /*+ hash_agg() */ bit_xor(col_12) aggCol from (select * from tbl_2 where tbl_2.col_12 in ( 'Bob' ) order by _tidb_rowid ) ordered_tbl for update ; +select * from tbl_6 where tbl_6.col_30 = 'Friday' for update ; +select col_7,col_6,col_9,col_5,col_52 from tbl_1 where tbl_1.col_6 <= 'Newsletter' for update ; +select * from tbl_4 where tbl_4.col_24 >= 'gold' for update ; +select /*+ hash_agg() */ approx_count_distinct(col_43) aggCol from (select * from tbl_6 where (col_31) = ('Wednesday') or (col_31) = ('Tuesday') or (col_31) = ('Saturday') or (col_31) = ('Monday') order by col_30 ) ordered_tbl group by col_43,col_33,col_30,col_31 ; +select tbl_4.* , tbl_4.col_21 from tbl_4 right join tbl_4 on col_21 <= col_24 where tbl_4.col_21 in ( 'Newsletter' , 'Magazine' ) ; +select /*+ INL_MERGE_JOIN( tbl_3 , tbl_3 ) */ tbl_3.* , tbl_3.col_40, tbl_3.col_19, tbl_3.col_15, tbl_3.col_17 from tbl_3 join tbl_3 on col_18 < col_15 where tbl_3.col_15 <= 'FALL' ; +select /*+ agg_to_cop() hash_agg() */ approx_count_distinct(col_18) aggCol from (select * from tbl_5 where tbl_5.col_18 in ( 'gold' , 'gold' , 'gold' , 'copper' , 'silver' , 'bronze' , 'copper' ) order by _tidb_rowid ) ordered_tbl group by col_37 for update ; +select /*+ agg_to_cop() */ avg(distinct col_17) aggCol from (select * from tbl_5 where tbl_5.col_18 >= 'silver' order by _tidb_rowid ) ordered_tbl group by col_37 ; +select /*+ agg_to_cop() */ bit_or(col_12) aggCol from (select * from tbl_2 where tbl_2.col_12 > 'David' order by _tidb_rowid ) ordered_tbl for update ; +select /*+ agg_to_cop() stream_agg() */ approx_percentile(col_0, 10) aggCol from (select * from tbl_0 where tbl_0.col_2 in ( 'DIME' , 'PENNY' , 'QUARTER' , 'NICKLE' , 'DIME' , 'NICKLE' , 'QUARTER' , 'QUARTER' , 'PENNY' , 'QUARTER' ) order by _tidb_rowid ) ordered_tbl for update ; +select * from tbl_6 where tbl_6.col_33 > 'Sunday' for update ; +select /*+ */ tbl_0.col_45, tbl_0.col_0 , tbl_6.col_30 from tbl_0 join tbl_6 ; +select * from tbl_4 where tbl_4.col_24 >= 'silver' ; +select tbl_5.* from tbl_5 where col_37 in ( select col_33 from tbl_6 where tbl_5.col_17 in ( 'Bob' , 'Charlie' , 'David' , 'Bob' ) ) ; +select /*+ INL_HASH_JOIN( tbl_2 , tbl_1 ) */ tbl_2.col_51 , tbl_1.* from tbl_2 right join tbl_1 on col_12 != col_6 or col_51 >= col_6 or col_12 = col_9 where tbl_2.col_12 <= 'Charlie' ; +select /*+ agg_to_cop() hash_agg() */ sum(col_18) aggCol from (select * from tbl_5 where tbl_5.col_17 <> 'David' order by _tidb_rowid ) ordered_tbl ; +select tbl_4.* from tbl_4 where col_20 in ( select col_18 from tbl_5 where tbl_5.col_37 != 'FALL' ) ; +select * from tbl_5 where tbl_5.col_17 != 'Charlie' ; +select /*+ agg_to_cop() hash_agg() */ approx_percentile(col_21, 37) aggCol from (select * from tbl_4 where tbl_4.col_20 >= 'SUMMER' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_24,col_49,col_20,col_23,col_21,col_22 for update ; +select /*+ agg_to_cop() hash_agg() */ stddev_samp(distinct col_0) aggCol from (select * from tbl_0 where tbl_0.col_2 in ( 'NICKLE' , 'QUARTER' ) order by _tidb_rowid ) ordered_tbl group by col_0 ; +select tbl_1.col_52 from tbl_1 where col_54 in ( select col_45 from tbl_0 where tbl_0.col_0 in ( 'Monday' , 'Tuesday' , 'Monday' , 'Monday' , 'Tuesday' , 'Monday' , 'Thursday' , 'Wednesday' , 'Monday' , 'Monday' , 'Wednesday' , 'Wednesday' , 'Monday' , 'Tuesday' ) and tbl_1.col_5 = 'bronze' ) ; +select /*+ agg_to_cop() stream_agg() */ count(distinct col_53) aggCol from (select * from tbl_3 where tbl_3.col_53 in ( 'NICKLE' , 'PENNY' , 'PENNY' , 'PENNY' ) order by col_15,col_19 ) ordered_tbl ; +select tbl_3.* from tbl_3 where col_42 in ( select col_30 from tbl_6 where tbl_6.col_33 in ( 'Thursday' ) ) ; +select /*+ hash_agg() */ count(distinct col_16) aggCol from (select * from tbl_3 where tbl_3.col_17 in ( 'Charlie' , 'David' , 'Charlie' , 'Charlie' , 'Bob' , 'Charlie' , 'Charlie' ) order by col_15,col_19 ) ordered_tbl for update ; +select * from tbl_4 where tbl_4.col_22 <= 'Alice' for update ; +select tbl_1.col_7 from tbl_1 where col_8 in ( select col_15 from tbl_3 where tbl_1.col_52 <= 'Newspaper' ) ; +select /*+ */ tbl_0.col_45, tbl_0.col_2 , tbl_0.col_45, tbl_0.col_0, tbl_0.col_2 from tbl_0 join tbl_0 ; +select * from tbl_3 where tbl_3.col_42 <= 'PENNY' ; +select /*+ hash_agg() */ avg(col_31) aggCol from (select * from tbl_6 where tbl_6.col_33 >= 'Wednesday' order by col_30 ) ordered_tbl for update ; +select tbl_5.col_37, tbl_5.col_18, tbl_5.col_17 from tbl_5 where col_37 in ( select col_45 from tbl_0 where tbl_5.col_37 = 'SUMMER' ) ; +select /*+ */ tbl_4.col_21 , tbl_6.col_30, tbl_6.col_33 from tbl_4 join tbl_6 ; +select bit_and(col_0) aggCol from (select * from tbl_0 where tbl_0.col_45 = 'WINTER' and tbl_0.col_45 in ( 'SPRING' , 'WINTER' ) order by _tidb_rowid ) ordered_tbl group by col_0,col_2,col_45 ; +select /*+ agg_to_cop() hash_agg() */ bit_xor(col_33) aggCol from (select * from tbl_6 where (col_31 = 'Wednesday') or (col_31 = 'Sunday') order by col_30 ) ordered_tbl ; +select /*+ MERGE_JOIN( tbl_1 , tbl_2 ) */ tbl_1.* , tbl_2.col_51, tbl_2.col_12, tbl_2.col_10 from tbl_1 left join tbl_2 on col_6 <= col_12 and col_5 != col_10 where tbl_1.col_7 != 'Alice' ; +select /*+ agg_to_cop() hash_agg() */ max(col_20) aggCol from (select * from tbl_4 where tbl_4.col_20 in ( 'WINTER' , 'SUMMER' , 'WINTER' , 'FALL' , 'SPRING' , 'SPRING' , 'SUMMER' ) or tbl_4.col_23 = 'SPRING' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select * from tbl_2 where tbl_2.col_51 >= 'copper' ; +select * from tbl_4 where (col_20, col_22, col_21, col_23, col_24) in (('FALL', 'Alice', 'Newspaper', 'WINTER', 'silver'), ('FALL', 'Charlie', 'Magazine', 'SUMMER', 'silver'), ('WINTER', 'David', 'Newspaper', 'SPRING', 'silver')) for update ; +select * from tbl_0 where tbl_0.col_2 <> 'DIME' for update ; +select * from tbl_6 where (col_30) in (('Tuesday'), ('Thursday')) for update ; +select stddev_samp(col_17) aggCol from (select * from tbl_5 where tbl_5.col_18 <> 'gold' or tbl_5.col_17 in ( 'Alice' , 'David' , 'Bob' , 'Charlie' , 'Alice' ) order by _tidb_rowid ) ordered_tbl group by col_17 for update ; +select tbl_6.* , tbl_5.col_17, tbl_5.col_18 from tbl_6 left join tbl_5 on col_30 >= col_37 where (col_37 = 'SUMMER') or (col_37 = 'SUMMER') or (col_37 = 'FALL') ; +select col_37 from tbl_5 where (col_37 = 'WINTER') for update ; +select /*+ agg_to_cop() stream_agg() */ group_concat(distinct col_5 order by col_5) aggCol from (select * from tbl_1 where (col_7 = 'David') or (col_7 = 'David') or (col_7 = 'Bob') order by _tidb_rowid ) ordered_tbl group by col_52 for update ; +select * from tbl_6 where tbl_6.col_33 in ( 'Monday' ) for update ; +select * from tbl_5 where (col_37) in (('FALL')) ; +select /*+ agg_to_cop() hash_agg() */ sum(col_9) aggCol from (select * from tbl_1 where tbl_1.col_8 > 'WINTER' order by _tidb_rowid ) ordered_tbl for update ; +select col_12 from tbl_2 where tbl_2.col_12 = 'Bob' and tbl_2.col_51 in ( 'copper' ) ; +select tbl_6.col_31, tbl_6.col_33, tbl_6.col_30, tbl_6.col_43 , tbl_3.* from tbl_6 left join tbl_3 on col_33 >= col_19 or col_30 != col_18 where tbl_6.col_43 in ( 'Monday' , 'Saturday' ) and tbl_6.col_30 in ( 'Sunday' ) or tbl_6.col_31 in ( 'Wednesday' ) or (col_17, col_18) in (('Charlie', 'bronze')) ; +select * from tbl_4 where tbl_4.col_23 in ( 'SUMMER' ) for update ; +select * from tbl_3 where tbl_3.col_17 in ( 'Charlie' , 'Bob' , 'Charlie' ) ; +select /*+ INL_MERGE_JOIN( tbl_0 , tbl_1 ) */ tbl_0.col_2, tbl_0.col_45 from tbl_0 where col_45 in ( select col_6 from tbl_1 where tbl_1.col_52 >= 'Newspaper' ) ; +select * from tbl_6 where tbl_6.col_31 <= 'Saturday' ; +select /*+ HASH_JOIN( tbl_5 , tbl_4 ) */ tbl_5.* , tbl_4.col_21 from tbl_5 join tbl_4 on col_17 > col_22 and col_18 <= col_22 and col_17 = col_24 and col_17 = col_49 and col_17 = col_21 where tbl_5.col_17 > 'Bob' or tbl_5.col_18 in ( 'silver' ) and tbl_4.col_49 < 'PENNY' ; +select /*+ agg_to_cop() hash_agg() */ min(col_10) aggCol from (select * from tbl_2 where tbl_2.col_10 > 'Tuesday' and tbl_2.col_10 in ( 'Monday' , 'Tuesday' ) order by _tidb_rowid ) ordered_tbl ; +select tbl_4.* from tbl_4 where col_22 in ( select col_8 from tbl_1 where tbl_1.col_9 >= 'gold' ) ; +select /*+ agg_to_cop() stream_agg() */ bit_or(col_31) aggCol from (select * from tbl_6 where tbl_6.col_30 in ( 'Wednesday' ) order by col_30 ) ordered_tbl ; +select col_54,col_6 from tbl_1 where tbl_1.col_6 > 'Book' and tbl_1.col_6 > 'Magazine' ; +select /*+ HASH_JOIN( tbl_4 , tbl_4 ) */ tbl_4.col_22, tbl_4.col_24, tbl_4.col_49 , tbl_4.* from tbl_4 right join tbl_4 on col_22 <= col_24 or col_22 < col_23 or col_21 >= col_24 or col_24 >= col_24 where tbl_4.col_20 > 'SUMMER' ; +select /*+ INL_JOIN( tbl_5 , tbl_1 ) */ tbl_5.col_17, tbl_5.col_18, tbl_5.col_37 from tbl_5 where col_37 in ( select col_9 from tbl_1 where tbl_1.col_54 < 'Book' ) ; +select col_16,col_15,col_18 from tbl_3 where tbl_3.col_19 > 'Newsletter' for update ; +select /*+ agg_to_cop() */ count(distinct col_10) aggCol from (select * from tbl_2 where tbl_2.col_10 <> 'Wednesday' order by _tidb_rowid ) ordered_tbl for update ; +select tbl_0.* , tbl_4.col_23 from tbl_0 join tbl_4 on col_2 = col_22 where tbl_4.col_20 in ( 'FALL' , 'SUMMER' , 'SUMMER' , 'SPRING' , 'FALL' , 'WINTER' , 'WINTER' ) ; +select /*+ agg_to_cop() stream_agg() */ stddev_samp(col_17) aggCol from (select * from tbl_3 where tbl_3.col_53 != 'PENNY' order by col_15,col_19 ) ordered_tbl group by col_42,col_17,col_18 for update ; +select bit_xor(col_30) aggCol from (select * from tbl_6 where (col_31 = 'Wednesday') or (col_31 = 'Friday') or (col_31 = 'Friday') order by col_30 ) ordered_tbl ; +select stddev_samp(col_16) aggCol from (select * from tbl_3 where (col_15, col_19) = ('WINTER', 'Magazine') order by col_15,col_19 ) ordered_tbl group by col_42,col_18,col_53,col_15 ; +select /*+ agg_to_cop() hash_agg() */ count(col_8) aggCol from (select * from tbl_1 where tbl_1.col_54 > 'Newsletter' order by _tidb_rowid ) ordered_tbl ; +select /*+ agg_to_cop() hash_agg() */ json_objectagg(col_45,col_45) aggCol from (select * from tbl_0 where tbl_0.col_45 >= 'WINTER' order by _tidb_rowid ) ordered_tbl ; +select /*+ MERGE_JOIN( tbl_1 , tbl_1 ) */ tbl_1.col_9, tbl_1.col_5, tbl_1.col_7 from tbl_1 where col_5 in ( select col_5 from tbl_1 where (col_7) in (('Alice')) ) ; +select col_51 from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'copper' , 'gold' , 'silver' , 'copper' , 'copper' , 'copper' , 'copper' , 'bronze' , 'copper' ) for update ; +select /*+ INL_JOIN( tbl_4 , tbl_1 ) */ tbl_4.* from tbl_4 where col_22 in ( select col_9 from tbl_1 where (col_7) = ('Alice') or (col_7) = ('David') or (col_7) = ('Charlie') or (col_7) = ('David') ) ; +select /*+ */ tbl_0.* , tbl_3.* from tbl_0 join tbl_3 ; +select /*+ INL_JOIN( tbl_5 , tbl_5 ) */ tbl_5.col_37, tbl_5.col_18, tbl_5.col_17 , tbl_5.col_17 from tbl_5 right join tbl_5 on col_37 > col_17 where tbl_5.col_17 in ( 'Charlie' , 'David' , 'David' , 'David' , 'Bob' , 'Alice' , 'Alice' ) ; +select tbl_1.* from tbl_1 where col_52 in ( select col_51 from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'silver' ) and tbl_2.col_51 in ( 'copper' ) ) ; +select * from tbl_3 where tbl_3.col_15 in ( 'SPRING' , 'WINTER' , 'SPRING' , 'SUMMER' , 'SUMMER' , 'SPRING' , 'SPRING' , 'SPRING' , 'FALL' , 'SPRING' ) ; +select /*+ INL_HASH_JOIN( tbl_2 , tbl_5 ) */ tbl_2.col_51 from tbl_2 where col_51 in ( select col_18 from tbl_5 where tbl_5.col_18 in ( 'silver' ) ) ; +select * from tbl_1 where tbl_1.col_9 in ( 'silver' , 'gold' , 'silver' , 'copper' ) ; +select json_objectagg(col_18,col_16) aggCol from (select * from tbl_3 where tbl_3.col_17 > 'Bob' order by col_15,col_19 ) ordered_tbl group by col_42 for update ; +select tbl_6.* from tbl_6 where col_56 in ( select col_56 from tbl_6 where (col_30 = 'Tuesday') or (col_30 = 'Tuesday') or (col_30 = 'Sunday') ) ; +select /*+ agg_to_cop() hash_agg() */ stddev_pop(distinct col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'copper' , 'bronze' , 'bronze' , 'copper' , 'copper' , 'copper' ) and tbl_2.col_51 in ( 'copper' ) or tbl_2.col_51 in ( 'copper' , 'silver' , 'silver' , 'copper' , 'gold' , 'copper' , 'copper' , 'copper' , 'copper' , 'silver' , 'gold' , 'copper' , 'gold' , 'copper' ) order by _tidb_rowid ) ordered_tbl for update ; +select /*+ MERGE_JOIN( tbl_2 , tbl_0 ) */ tbl_2.* from tbl_2 where col_51 in ( select col_55 from tbl_0 where tbl_2.col_51 in ( 'bronze' , 'copper' , 'copper' , 'copper' ) ) ; +select bit_xor(col_49) aggCol from (select * from tbl_4 where tbl_4.col_23 > 'WINTER' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_24 ; +select /*+ stream_agg() */ stddev_samp(col_22) aggCol from (select * from tbl_4 where tbl_4.col_22 in ( 'David' , 'Alice' , 'Bob' , 'Charlie' , 'Charlie' , 'Charlie' , 'Alice' , 'David' , 'Bob' , 'Alice' , 'Alice' ) and tbl_4.col_20 <= 'SPRING' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl ; +select * from tbl_0 where tbl_0.col_55 in ( 'copper' , 'bronze' ) ; +select /*+ MERGE_JOIN( tbl_5 , tbl_6 ) */ tbl_5.col_18, tbl_5.col_17, tbl_5.col_37 , tbl_6.col_33 from tbl_5 join tbl_6 ; +select col_49 from tbl_4 where tbl_4.col_22 in ( 'David' , 'Bob' , 'Charlie' ) ; +select tbl_1.* from tbl_1 where col_9 in ( select col_45 from tbl_0 where tbl_1.col_6 in ( 'Newspaper' , null , 'Book' ) ) ; +select /*+ agg_to_cop() stream_agg() */ min(col_2) aggCol from (select * from tbl_0 where tbl_0.col_2 in ( 'NICKLE' ) order by _tidb_rowid ) ordered_tbl for update ; +select var_samp(distinct col_43) aggCol from (select * from tbl_6 where tbl_6.col_31 in ( 'Friday' , 'Sunday' , 'Tuesday' , 'Wednesday' , 'Sunday' , 'Monday' , 'Monday' , 'Wednesday' , 'Wednesday' ) order by col_30 ) ordered_tbl for update ; +select /*+ */ tbl_3.* , tbl_0.col_2 from tbl_3 join tbl_0 ; +select /*+ INL_HASH_JOIN( tbl_4 , tbl_0 ) */ tbl_4.col_49 , tbl_0.col_2, tbl_0.col_55 from tbl_4 join tbl_0 on col_21 >= col_45 and col_20 = col_45 and col_20 != col_45 where tbl_4.col_23 < 'SUMMER' or (col_23 = 'FALL') or (col_23 = 'FALL') or (col_23 = 'WINTER') or (col_23 = 'SUMMER') ; +select /*+ INL_MERGE_JOIN( tbl_1 , tbl_1 ) */ tbl_1.* , tbl_1.col_8 from tbl_1 right join tbl_1 on col_5 != col_9 where (col_7 = 'David') or (col_7 = 'Bob') or (col_7 = 'Alice') ; +select col_31,col_43,col_33 from tbl_6 where (col_30) in (('Friday'), ('Tuesday'), ('Saturday')) ; +select tbl_3.col_19, tbl_3.col_16, tbl_3.col_58, tbl_3.col_42 from tbl_3 where col_17 in ( select col_55 from tbl_0 where tbl_0.col_55 != 'gold' ) ; +select /*+ HASH_JOIN( tbl_6 , tbl_2 ) */ tbl_6.* , tbl_2.col_51 from tbl_6 join tbl_2 ; +select tbl_4.col_24, tbl_4.col_22 , tbl_3.col_17 from tbl_4 left join tbl_3 on col_21 < col_15 and col_20 >= col_15 where tbl_3.col_17 in ( 'Alice' , 'Bob' , 'David' ) ; +select * from tbl_5 where tbl_5.col_17 in ( 'Charlie' , 'Bob' , 'Alice' , 'Alice' , 'Charlie' , 'Charlie' ) for update ; +select /*+ agg_to_cop() */ count(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 = 'gold' order by _tidb_rowid ) ordered_tbl ; +select tbl_3.col_53 , tbl_5.* from tbl_3 join tbl_5 on col_17 < col_17 and col_18 >= col_37 where tbl_5.col_18 in ( 'bronze' , 'copper' , 'bronze' ) or tbl_3.col_18 <= 'gold' ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' ) ; +select /*+ INL_HASH_JOIN( tbl_4 , tbl_2 ) */ tbl_4.* , tbl_2.* from tbl_4 join tbl_2 ; +select * from tbl_5 where tbl_5.col_37 < 'FALL' and tbl_5.col_37 <= 'SUMMER' for update ; +select tbl_3.* from tbl_3 where col_15 in ( select col_23 from tbl_4 where tbl_4.col_20 <= 'FALL' ) ; +select /*+ agg_to_cop() hash_agg() */ var_samp(col_23) aggCol from (select * from tbl_4 where tbl_4.col_20 > 'SPRING' and tbl_4.col_20 = 'SPRING' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl ; +select col_33,col_57,col_56,col_60 from tbl_6 where tbl_6.col_56 >= 'DIME' or (col_31) in (('Sunday')) ; +select * from tbl_6 where tbl_6.col_30 in ( 'Monday' ) ; +select /*+ agg_to_cop() stream_agg() */ approx_count_distinct(col_20) aggCol from (select * from tbl_4 where tbl_4.col_49 in ( 'PENNY' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select col_5 from tbl_1 where tbl_1.col_9 <= 'silver' for update ; +select col_56 from tbl_6 where tbl_6.col_57 != 'FALL' ; +select /*+ agg_to_cop() stream_agg() */ bit_or(col_22) aggCol from (select * from tbl_4 where tbl_4.col_23 <= 'WINTER' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select * from tbl_3 where tbl_3.col_42 > 'PENNY' ; +select * from tbl_6 where tbl_6.col_31 in ( 'Friday' , 'Thursday' , 'Wednesday' , 'Saturday' , 'Tuesday' , 'Wednesday' , 'Tuesday' , 'Tuesday' ) for update ; +select tbl_2.col_51 from tbl_2 where col_51 in ( select col_37 from tbl_5 where tbl_5.col_17 in ( 'Alice' , 'David' ) ) ; +select /*+ hash_agg() */ approx_percentile(col_45, 80) aggCol from (select * from tbl_0 where (col_45) = ('SPRING') or (col_45) = ('WINTER') order by _tidb_rowid ) ordered_tbl for update ; +select /*+ hash_agg() */ bit_xor(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'silver' , 'copper' , 'copper' , 'copper' ) order by _tidb_rowid ) ordered_tbl ; +select /*+ HASH_JOIN( tbl_5 , tbl_2 ) */ tbl_5.* from tbl_5 where col_17 in ( select col_51 from tbl_2 where tbl_2.col_51 = 'bronze' or tbl_5.col_17 = 'Bob' ) ; +select col_17,col_18,col_37 from tbl_5 where (col_17, col_37) in (('Alice', 'SUMMER'), ('David', 'FALL')) for update ; +select /*+ MERGE_JOIN( tbl_0 , tbl_6 ) */ tbl_0.* , tbl_6.* from tbl_0 left join tbl_6 on col_45 <= col_57 and col_55 >= col_43 where tbl_0.col_55 in ( 'copper' ) or (col_30) in (('Monday'), ('Tuesday'), ('Thursday'), ('Friday')) ; +select * from tbl_4 where tbl_4.col_21 in ( 'Newspaper' ) and (col_22 = 'Alice' and col_23 = 'SUMMER' and col_20 = 'SPRING' and col_21 = 'Magazine' and col_24 = 'bronze') or (col_22 = 'Charlie' and col_23 = 'FALL' and col_20 = 'FALL' and col_21 = 'Newsletter' and col_24 = 'gold') ; +select /*+ INL_HASH_JOIN( tbl_4 , tbl_0 ) */ tbl_4.col_49, tbl_4.col_23 , tbl_0.col_2 from tbl_4 join tbl_0 ; +select * from tbl_2 where tbl_2.col_51 in ( 'gold' , 'copper' ) ; +select tbl_0.* from tbl_0 where col_45 in ( select col_8 from tbl_1 where (col_45 = 'WINTER') ) ; +select /*+ hash_agg() */ json_objectagg(col_20,col_49) aggCol from (select * from tbl_4 where tbl_4.col_20 in ( 'SPRING' ) and tbl_4.col_24 in ( 'copper' , 'gold' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select * from tbl_6 where (col_30) in (('Saturday'), ('Monday'), ('Saturday')) ; +select col_51 from tbl_2 where tbl_2.col_51 in ( 'copper' ) for update ; +select /*+ */ tbl_2.col_51 , tbl_2.* from tbl_2 join tbl_2 ; +select col_43,col_60,col_33,col_56,col_57 from tbl_6 where tbl_6.col_56 != 'NICKLE' ; +select col_57 from tbl_6 where (col_31 = 'Friday') ; +select /*+ INL_MERGE_JOIN( tbl_6 , tbl_1 ) */ tbl_6.col_43 , tbl_1.* from tbl_6 join tbl_1 ; +select /*+ agg_to_cop() hash_agg() */ json_objectagg(col_21,col_49) aggCol from (select * from tbl_4 where tbl_4.col_21 >= 'Book' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_22 ; +select col_57 from tbl_6 where (col_30) = ('Wednesday') or (col_30) = ('Wednesday') or (col_30) = ('Monday') ; +select * from tbl_4 where tbl_4.col_49 in ( 'DIME' , 'PENNY' , 'QUARTER' , 'PENNY' , 'PENNY' ) ; +select * from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'WINTER' , 'WINTER' , 'SUMMER' , 'FALL' , 'WINTER' , 'WINTER' , 'WINTER' , 'SPRING' ) for update ; +select /*+ INL_MERGE_JOIN( tbl_1 , tbl_2 ) */ tbl_1.col_8 from tbl_1 where col_5 in ( select col_51 from tbl_2 where tbl_1.col_54 in ( 'Newspaper' , 'Newspaper' , 'Newspaper' ) ) ; +select /*+ MERGE_JOIN( tbl_6 , tbl_1 ) */ tbl_6.* from tbl_6 where col_56 in ( select col_6 from tbl_1 where (col_30 = 'Sunday') or (col_30 = 'Monday') or (col_30 = 'Friday') or (col_30 = 'Monday') ) ; +select col_54 from tbl_1 where (col_7 = 'Alice' and col_5 = 'gold' and col_8 = 'SPRING' and col_9 = 'copper' and col_6 = 'Newsletter') or (col_7 = 'Alice' and col_5 = 'copper' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Book') or (col_7 = 'Charlie' and col_5 = 'copper' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Newspaper') or (col_7 = 'Bob' and col_5 = 'bronze' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Magazine') ; +select /*+ agg_to_cop() */ stddev_samp(col_30) aggCol from (select * from tbl_6 where tbl_6.col_30 != 'Sunday' order by col_30 ) ordered_tbl group by col_33,col_60,col_56 for update ; +select /*+ hash_agg() */ var_pop(col_43) aggCol from (select * from tbl_6 where tbl_6.col_57 in ( 'WINTER' , 'FALL' , 'WINTER' , 'SPRING' ) and tbl_6.col_43 != 'Thursday' and tbl_6.col_33 <> 'Friday' order by col_30 ) ordered_tbl group by col_30,col_31,col_60 ; +select tbl_6.* , tbl_3.* from tbl_6 right join tbl_3 on col_43 <> col_16 where tbl_3.col_18 in ( 'copper' , 'silver' , 'silver' , 'silver' , 'copper' , 'bronze' ) ; +select * from tbl_4 where tbl_4.col_24 <> 'silver' for update ; +select col_37,col_18,col_17 from tbl_5 where tbl_5.col_17 in ( 'Bob' , 'Bob' , 'Charlie' , 'Alice' , 'Charlie' , 'Bob' , 'David' , 'Charlie' , 'Alice' , 'Bob' , 'Bob' , 'Alice' , 'David' , 'David' , 'Alice' , 'Bob' , 'David' , 'Bob' , 'Bob' , 'Alice' , 'Charlie' ) ; +select /*+ INL_MERGE_JOIN( tbl_3 , tbl_6 ) */ tbl_3.* from tbl_3 where col_17 in ( select col_30 from tbl_6 where tbl_3.col_15 = 'SPRING' ) ; +select tbl_5.* , tbl_5.* from tbl_5 join tbl_5 on col_18 <= col_17 and col_18 != col_18 where tbl_5.col_17 in ( 'Charlie' , 'Bob' ) ; +select col_51 from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'silver' , 'silver' , 'bronze' ) or tbl_2.col_51 = 'copper' ; +select /*+ stream_agg() */ avg(distinct col_18) aggCol from (select * from tbl_3 where tbl_3.col_53 in ( 'PENNY' , 'PENNY' , 'NICKLE' , 'PENNY' , 'PENNY' , 'PENNY' ) order by col_15,col_19 ) ordered_tbl group by col_59,col_15 for update ; +select * from tbl_4 where tbl_4.col_20 in ( 'SUMMER' ) and tbl_4.col_23 in ( 'WINTER' , 'WINTER' , 'SPRING' , 'WINTER' , 'SPRING' ) ; +select col_17,col_18 from tbl_5 where tbl_5.col_17 > 'Charlie' ; +select /*+ INL_JOIN( tbl_2 , tbl_6 ) */ tbl_2.* from tbl_2 where col_51 in ( select col_30 from tbl_6 where tbl_6.col_60 in ( 'WINTER' , 'FALL' ) ) ; +select /*+ MERGE_JOIN( tbl_6 , tbl_2 ) */ tbl_6.* , tbl_2.* from tbl_6 right join tbl_2 on col_43 > col_51 where tbl_6.col_43 > 'Saturday' and tbl_2.col_51 in ( 'copper' ) ; +select col_42,col_17,col_18,col_53,col_16 from tbl_3 where tbl_3.col_58 <= 'copper' and tbl_3.col_15 != 'SUMMER' or tbl_3.col_18 in ( 'copper' , 'bronze' , 'gold' , 'copper' ) ; +select * from tbl_1 where tbl_1.col_8 >= 'FALL' and tbl_1.col_52 in ( 'Newspaper' ) for update ; +select * from tbl_3 where tbl_3.col_59 != 'PENNY' for update ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' ) and tbl_2.col_51 > 'copper' for update ; +select /*+ agg_to_cop() stream_agg() */ var_samp(col_9) aggCol from (select * from tbl_1 where tbl_1.col_6 in ( 'Newsletter' ) order by _tidb_rowid ) ordered_tbl group by col_9,col_8 for update ; +select /*+ hash_agg() */ max(col_5) aggCol from (select * from tbl_1 where tbl_1.col_54 in ( 'Book' ) order by _tidb_rowid ) ordered_tbl group by col_54,col_5,col_52 ; +select col_18,col_37 from tbl_5 where tbl_5.col_17 < 'Charlie' for update ; +select * from tbl_0 where tbl_0.col_45 = 'WINTER' ; +select * from tbl_5 where tbl_5.col_17 > 'Bob' and tbl_5.col_18 = 'bronze' ; +select col_45 from tbl_0 where tbl_0.col_45 > 'FALL' for update ; +select * from tbl_6 where tbl_6.col_30 in ( 'Thursday' , 'Sunday' , null ) for update ; +select /*+ agg_to_cop() stream_agg() */ count(col_22) aggCol from (select * from tbl_4 where (col_20, col_22, col_21, col_23, col_24) = ('SUMMER', 'Charlie', 'Magazine', 'SPRING', 'bronze') or (col_20, col_22, col_21, col_23, col_24) = ('SUMMER', 'Bob', 'Newspaper', 'FALL', 'gold') order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select /*+ agg_to_cop() stream_agg() */ bit_and(col_23) aggCol from (select * from tbl_4 where tbl_4.col_21 < 'Magazine' and tbl_4.col_23 in ( 'WINTER' , 'WINTER' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_23 ; +select approx_count_distinct(col_24) aggCol from (select * from tbl_4 where tbl_4.col_21 in ( 'Newspaper' , 'Newspaper' , 'Book' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select /*+ HASH_JOIN( tbl_0 , tbl_6 ) */ tbl_0.* , tbl_6.col_33, tbl_6.col_57 from tbl_0 join tbl_6 ; +select * from tbl_1 where tbl_1.col_6 > 'Book' ; +select /*+ agg_to_cop() */ approx_percentile(col_51, 39) aggCol from (select * from tbl_2 where tbl_2.col_51 <= 'copper' order by _tidb_rowid ) ordered_tbl group by col_51 for update ; +select /*+ INL_MERGE_JOIN( tbl_1 , tbl_3 ) */ tbl_1.* from tbl_1 where col_6 in ( select col_17 from tbl_3 where tbl_3.col_15 in ( 'SPRING' , 'SUMMER' , 'SPRING' , 'SPRING' , 'SPRING' ) ) ; +select /*+ agg_to_cop() hash_agg() */ stddev_pop(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'bronze' , 'copper' ) order by _tidb_rowid ) ordered_tbl for update ; +select /*+ */ tbl_3.* , tbl_3.col_53, tbl_3.col_59, tbl_3.col_42, tbl_3.col_58, tbl_3.col_19, tbl_3.col_17, tbl_3.col_15 from tbl_3 join tbl_3 ; +select /*+ agg_to_cop() */ sum(col_61) aggCol from (select * from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SPRING' ) and tbl_0.col_2 in ( 'QUARTER' , 'NICKLE' , 'PENNY' ) order by _tidb_rowid ) ordered_tbl for update ; +select /*+ MERGE_JOIN( tbl_4 , tbl_2 ) */ tbl_4.* , tbl_2.col_51 from tbl_4 join tbl_2 ; +select * from tbl_5 where tbl_5.col_37 < 'SUMMER' ; +select * from tbl_0 where tbl_0.col_45 <> 'WINTER' for update ; +select col_17,col_18 from tbl_5 where tbl_5.col_37 in ( 'WINTER' , 'SPRING' , 'WINTER' , 'WINTER' , 'SPRING' , 'SPRING' ) for update ; +select /*+ agg_to_cop() */ count(distinct col_23) aggCol from (select * from tbl_4 where tbl_4.col_23 > 'WINTER' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_20 ; +select /*+ MERGE_JOIN( tbl_5 , tbl_6 ) */ tbl_5.col_17 from tbl_5 where col_17 in ( select col_57 from tbl_6 where tbl_5.col_17 != 'Alice' or tbl_6.col_43 in ( 'Wednesday' , 'Thursday' ) or tbl_5.col_18 in ( 'silver' , 'bronze' , 'silver' ) ) ; +select tbl_0.* from tbl_0 where col_45 in ( select col_51 from tbl_2 where tbl_2.col_51 != 'copper' ) ; +select /*+ hash_agg() */ stddev_samp(distinct col_37) aggCol from (select * from tbl_5 where tbl_5.col_18 > 'gold' order by _tidb_rowid ) ordered_tbl ; +select /*+ hash_agg() */ max(col_17) aggCol from (select * from tbl_3 where tbl_3.col_16 != 'DIME' order by col_15,col_19 ) ordered_tbl ; +select * from tbl_2 where tbl_2.col_51 <= 'gold' ; +select /*+ hash_agg() */ var_samp(distinct col_24) aggCol from (select * from tbl_4 where tbl_4.col_23 <= 'SPRING' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_24,col_22 for update ; +select * from tbl_2 where tbl_2.col_51 > 'copper' ; +select /*+ agg_to_cop() stream_agg() */ bit_and(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 = 'copper' order by _tidb_rowid ) ordered_tbl group by col_51 ; +select * from tbl_0 where tbl_0.col_61 in ( 'copper' ) for update ; +select /*+ agg_to_cop() hash_agg() */ bit_and(col_61) aggCol from (select * from tbl_0 where tbl_0.col_2 <> 'NICKLE' order by _tidb_rowid ) ordered_tbl group by col_61 for update ; +select col_54,col_5 from tbl_1 where tbl_1.col_5 in ( 'silver' , 'silver' ) or (col_7, col_5, col_8, col_9, col_6) = ('Charlie', 'copper', 'FALL', 'bronze', 'Book') or (col_7, col_5, col_8, col_9, col_6) = ('Charlie', 'silver', 'SUMMER', 'copper', 'Magazine') for update ; +select bit_xor(col_15) aggCol from (select * from tbl_3 where tbl_3.col_16 < 'NICKLE' order by col_15,col_19 ) ordered_tbl group by col_15,col_17,col_42,col_16,col_59,col_53 for update ; +select /*+ hash_agg() */ max(col_53) aggCol from (select * from tbl_3 where (col_15 = 'WINTER' and col_19 = 'Newspaper') or (col_15 = null and col_19 = 'Book') or (col_15 = 'SPRING' and col_19 = 'Newspaper') order by col_15,col_19 ) ordered_tbl group by col_53 for update ; +select * from tbl_6 where tbl_6.col_57 <= 'WINTER' for update ; +select /*+ agg_to_cop() hash_agg() */ bit_xor(col_7) aggCol from (select * from tbl_1 where (col_7 = 'Charlie') order by _tidb_rowid ) ordered_tbl group by col_54,col_9,col_52,col_7,col_8 ; +select /*+ hash_agg() */ approx_percentile(col_15, 40) aggCol from (select * from tbl_3 where tbl_3.col_53 in ( 'PENNY' , 'PENNY' , 'NICKLE' ) order by col_15,col_19 ) ordered_tbl ; +select tbl_4.col_22, tbl_4.col_21 from tbl_4 where col_23 in ( select col_21 from tbl_4 where tbl_4.col_20 in ( 'WINTER' , 'FALL' , 'FALL' , 'SUMMER' , 'WINTER' , 'SPRING' , 'FALL' , 'SPRING' , 'WINTER' , 'SUMMER' , 'SUMMER' , 'SPRING' , 'SUMMER' , 'SUMMER' , 'WINTER' , 'SPRING' ) ) ; +select /*+ hash_agg() */ bit_xor(col_5) aggCol from (select * from tbl_1 where tbl_1.col_6 >= 'Magazine' order by _tidb_rowid ) ordered_tbl group by col_9,col_6,col_8 ; +select col_21 from tbl_4 where tbl_4.col_24 in ( 'silver' , 'gold' ) and (col_23 = 'SPRING') or (col_23 = 'SPRING') or (col_23 = 'SPRING') or (col_23 = 'WINTER') ; +select /*+ agg_to_cop() stream_agg() */ bit_and(col_58) aggCol from (select * from tbl_3 where tbl_3.col_18 in ( 'copper' ) and tbl_3.col_15 in ( 'SUMMER' , 'FALL' , 'WINTER' , 'FALL' ) and (col_19 = 'Newsletter' and col_15 = 'SUMMER' and col_17 = 'Charlie' and col_42 = 'PENNY' and col_58 = 'copper' and col_53 = 'PENNY') or (col_19 = 'Book' and col_15 = 'SPRING' and col_17 = 'Charlie' and col_42 = 'PENNY' and col_58 = 'copper' and col_53 = 'PENNY') or (col_19 = 'Newspaper' and col_15 = 'SUMMER' and col_17 = 'David' and col_42 = 'PENNY' and col_58 = 'copper' and col_53 = 'PENNY') or (col_19 = 'Magazine' and col_15 = 'SPRING' and col_17 = 'Charlie' and col_42 = 'PENNY' and col_58 = 'copper' and col_53 = 'PENNY') order by col_15,col_19 ) ordered_tbl ; +select col_45,col_61 from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SUMMER' , 'WINTER' , 'SPRING' , 'WINTER' , 'SUMMER' , 'WINTER' , 'WINTER' , 'WINTER' , 'WINTER' ) for update ; +select /*+ agg_to_cop() stream_agg() */ approx_count_distinct(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'silver' , 'copper' , 'bronze' , 'copper' ) or tbl_2.col_51 in ( 'copper' , 'copper' , 'silver' , 'gold' , 'copper' , 'copper' , 'copper' , 'gold' ) order by _tidb_rowid ) ordered_tbl group by col_51 for update ; +select /*+ agg_to_cop() */ sum(distinct col_24) aggCol from (select * from tbl_4 where tbl_4.col_24 <= 'bronze' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl for update ; +select * from tbl_5 where tbl_5.col_62 <> 'silver' for update ; +select /*+ HASH_JOIN( tbl_1 , tbl_5 ) */ tbl_1.col_5, tbl_1.col_6 , tbl_5.col_62 from tbl_1 left join tbl_5 on col_7 <> col_17 where tbl_5.col_62 < 'gold' ; +select /*+ */ tbl_4.col_64, tbl_4.col_23 , tbl_6.col_31 from tbl_4 join tbl_6 ; +select /*+ */ tbl_5.* , tbl_2.* from tbl_5 join tbl_2 ; +select * from tbl_5 where tbl_5.col_17 in ( 'Charlie' , 'Charlie' , 'Alice' , 'Bob' , 'David' , 'Alice' , 'Alice' ) ; +select * from tbl_5 where tbl_5.col_17 in ( 'Alice' , 'David' ) ; +select * from tbl_6 where tbl_6.col_60 <> 'WINTER' and tbl_6.col_57 = 'SPRING' ; +select /*+ agg_to_cop() */ stddev_pop(distinct col_31) aggCol from (select * from tbl_6 where tbl_6.col_60 in ( 'SPRING' , 'FALL' , 'WINTER' , 'SPRING' ) or tbl_6.col_30 <= 'Thursday' order by col_30 ) ordered_tbl ; +select col_21,col_64 from tbl_4 where tbl_4.col_21 in ( 'Magazine' , 'Magazine' , 'Newsletter' , 'Book' ) ; +select * from tbl_0 where (col_45) in (('WINTER')) for update ; +select col_62 from tbl_5 where tbl_5.col_62 < 'copper' ; +select tbl_6.col_31, tbl_6.col_43 from tbl_6 where col_31 in ( select col_51 from tbl_2 where tbl_6.col_31 in ( 'Monday' , 'Sunday' , 'Monday' , 'Sunday' , 'Saturday' ) or tbl_6.col_43 >= 'Friday' ) ; +select col_45 from tbl_0 where (col_45 = 'WINTER') or (col_45 = 'WINTER') for update ; +select stddev_samp(distinct col_52) aggCol from (select * from tbl_1 where (col_7 = 'David' and col_5 = 'gold' and col_8 = 'SUMMER' and col_9 = 'copper' and col_6 = 'Newsletter') or (col_7 = 'Charlie' and col_5 = 'gold' and col_8 = 'SUMMER' and col_9 = 'silver' and col_6 = 'Newsletter') or (col_7 = 'Alice' and col_5 = 'gold' and col_8 = 'WINTER' and col_9 = 'copper' and col_6 = null) order by _tidb_rowid ) ordered_tbl ; +select /*+ */ tbl_3.* , tbl_2.col_51 from tbl_3 join tbl_2 ; +select col_62 from tbl_5 where tbl_5.col_62 >= 'copper' for update ; +select bit_or(col_5) aggCol from (select * from tbl_1 where tbl_1.col_8 in ( 'SPRING' ) or tbl_1.col_9 = 'gold' order by _tidb_rowid ) ordered_tbl group by col_52,col_7 for update ; +select col_45 from tbl_0 where tbl_0.col_45 in ( 'WINTER' ) and tbl_0.col_45 != 'WINTER' for update ; +select * from tbl_6 where tbl_6.col_33 in ( 'Sunday' , 'Monday' , 'Wednesday' , 'Sunday' , 'Thursday' , 'Wednesday' ) for update ; +select /*+ hash_agg() */ approx_count_distinct(col_62) aggCol from (select * from tbl_5 where tbl_5.col_62 in ( 'gold' , 'copper' ) order by _tidb_rowid ) ordered_tbl for update ; +select col_52 from tbl_1 where tbl_1.col_5 <> 'bronze' ; +select /*+ */ tbl_6.col_56 , tbl_5.col_62 from tbl_6 join tbl_5 ; +select approx_percentile(col_51, 78) aggCol from (select * from tbl_2 where tbl_2.col_51 < 'copper' order by _tidb_rowid ) ordered_tbl group by col_51 ; +select /*+ agg_to_cop() hash_agg() */ json_objectagg(col_62,col_62) aggCol from (select * from tbl_5 where tbl_5.col_62 in ( 'copper' , 'silver' , 'silver' , 'gold' , 'gold' , 'silver' , 'bronze' , 'gold' , 'copper' ) order by _tidb_rowid ) ordered_tbl group by col_62 ; +select /*+ INL_MERGE_JOIN( tbl_2 , tbl_3 ) */ tbl_2.col_51 from tbl_2 where col_51 in ( select col_42 from tbl_3 where tbl_2.col_51 > 'copper' ) ; +select tbl_3.* from tbl_3 where col_15 in ( select col_56 from tbl_6 where tbl_3.col_58 in ( 'copper' ) or tbl_6.col_56 in ( 'NICKLE' , 'QUARTER' ) ) ; +select * from tbl_1 where tbl_1.col_8 != 'WINTER' for update ; +select /*+ INL_MERGE_JOIN( tbl_0 , tbl_4 ) */ tbl_0.* , tbl_4.col_22 from tbl_0 join tbl_4 on col_45 >= col_23 where tbl_0.col_45 <= 'WINTER' ; +select * from tbl_1 where tbl_1.col_6 = 'Book' ; +select /*+ agg_to_cop() hash_agg() */ stddev_samp(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 >= 'silver' order by _tidb_rowid ) ordered_tbl ; +select * from tbl_3 where tbl_3.col_16 in ( 'NICKLE' , 'NICKLE' , 'QUARTER' , 'QUARTER' , 'PENNY' , 'PENNY' , 'DIME' , 'PENNY' , 'NICKLE' , 'PENNY' , 'DIME' , 'DIME' ) and tbl_3.col_17 in ( 'David' , 'Charlie' , 'Charlie' , 'David' , 'Charlie' , 'Charlie' , 'Charlie' , 'David' , 'David' , 'David' , 'David' , 'Bob' ) and (col_15, col_19) in (('FALL', 'Magazine'), ('SPRING', 'Magazine'), ('SPRING', 'Book'), ('SUMMER', 'Book')) for update ; +select /*+ stream_agg() */ json_objectagg(col_18,col_18) aggCol from (select * from tbl_3 where (col_17, col_18) = ('Charlie', 'bronze') or (col_17, col_18) = ('Charlie', 'silver') or (col_17, col_18) = ('Charlie', 'bronze') order by col_15,col_19 ) ordered_tbl for update ; +select /*+ stream_agg() */ approx_count_distinct(col_22) aggCol from (select * from tbl_4 where tbl_4.col_20 > 'SPRING' or tbl_4.col_23 != 'FALL' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_21,col_23,col_24,col_22 ; +select /*+ agg_to_cop() stream_agg() */ avg(col_62) aggCol from (select * from tbl_5 where tbl_5.col_62 in ( 'gold' , 'gold' , 'silver' , 'copper' , 'gold' ) and tbl_5.col_62 != 'copper' order by _tidb_rowid ) ordered_tbl group by col_62 ; +select col_62 from tbl_5 where tbl_5.col_62 <> 'silver' ; +select /*+ agg_to_cop() stream_agg() */ min(distinct col_22) aggCol from (select * from tbl_4 where (col_20 = null and col_22 = 'David' and col_21 = 'Newsletter' and col_23 = 'WINTER' and col_24 = 'silver') or (col_20 = 'FALL' and col_22 = 'Alice' and col_21 = 'Magazine' and col_23 = 'FALL' and col_24 = 'gold') order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl ; +select col_45 from tbl_0 where tbl_0.col_45 != 'WINTER' for update ; +select * from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' ) or tbl_0.col_45 <= 'WINTER' ; +select tbl_0.col_45 from tbl_0 where col_45 in ( select col_45 from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'WINTER' ) ) ; +select col_33,col_30,col_31 from tbl_6 where (col_30 = 'Thursday' and col_43 = 'Friday') or (col_30 = 'Monday' and col_43 = 'Saturday') ; +select /*+ MERGE_JOIN( tbl_2 , tbl_3 ) */ tbl_2.col_51 , tbl_3.* from tbl_2 left join tbl_3 on col_51 <> col_17 and col_51 <= col_58 where tbl_2.col_51 <= 'bronze' ; +select tbl_4.* from tbl_4 where col_24 in ( select col_18 from tbl_3 where (col_17, col_18) in (('David', 'copper'), ('Charlie', 'gold')) ) ; +select /*+ agg_to_cop() stream_agg() */ bit_or(col_24) aggCol from (select * from tbl_4 where tbl_4.col_20 > 'SUMMER' or tbl_4.col_24 in ( 'bronze' , 'bronze' ) or tbl_4.col_22 != 'Alice' order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_24 ; +select /*+ INL_HASH_JOIN( tbl_1 , tbl_6 ) */ tbl_1.* , tbl_6.col_43, tbl_6.col_56, tbl_6.col_30 from tbl_1 join tbl_6 ; +select /*+ agg_to_cop() hash_agg() */ var_pop(col_66) aggCol from (select * from tbl_5 where tbl_5.col_62 != 'copper' order by _tidb_rowid ) ordered_tbl for update ; +select tbl_5.col_66, tbl_5.col_62 from tbl_5 where col_66 in ( select col_45 from tbl_0 where tbl_5.col_66 >= 'NICKLE' ) ; +select /*+ HASH_JOIN( tbl_5 , tbl_6 ) */ tbl_5.col_66 , tbl_6.col_30 from tbl_5 join tbl_6 ; +select * from tbl_2 where tbl_2.col_51 = 'copper' for update ; +select /*+ agg_to_cop() stream_agg() */ max(col_45) aggCol from (select * from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SUMMER' ) order by _tidb_rowid ) ordered_tbl for update ; +select /*+ agg_to_cop() */ bit_and(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'copper' ) order by _tidb_rowid ) ordered_tbl ; +select tbl_0.* from tbl_0 where col_45 in ( select col_8 from tbl_1 where tbl_1.col_9 in ( 'silver' , 'gold' , 'gold' , 'silver' ) ) ; +select tbl_1.col_8 from tbl_1 where col_7 in ( select col_51 from tbl_2 where tbl_2.col_51 = 'copper' or tbl_1.col_9 in ( 'bronze' , 'gold' , 'silver' , 'bronze' ) ) ; +select col_45 from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SPRING' , 'WINTER' , 'WINTER' ) or tbl_0.col_45 <> 'WINTER' for update ; +select * from tbl_2 where tbl_2.col_51 != 'copper' for update ; +select col_59 from tbl_3 where tbl_3.col_58 = 'copper' and tbl_3.col_18 in ( 'copper' , 'bronze' , 'bronze' ) ; +select tbl_3.* , tbl_1.col_5, tbl_1.col_8 from tbl_3 join tbl_1 on col_15 < col_7 where (col_7) in (('David'), ('Charlie'), ('Alice'), ('Bob')) ; +select /*+ HASH_JOIN( tbl_0 , tbl_3 ) */ tbl_0.col_45 , tbl_3.col_17, tbl_3.col_42, tbl_3.col_16, tbl_3.col_18 from tbl_0 right join tbl_3 on col_45 > col_42 or col_45 <> col_42 where tbl_0.col_45 > 'WINTER' and tbl_3.col_17 in ( 'Charlie' , 'Bob' ) or (col_17, col_18) = ('Alice', 'bronze') ; +select /*+ HASH_JOIN( tbl_6 , tbl_4 ) */ tbl_6.col_31, tbl_6.col_60, tbl_6.col_57, tbl_6.col_56, tbl_6.col_30, tbl_6.col_43 , tbl_4.* from tbl_6 join tbl_4 ; +select * from tbl_1 where tbl_1.col_6 in ( null , 'Newspaper' , 'Newspaper' ) ; +select tbl_6.col_33, tbl_6.col_56 , tbl_2.col_51 from tbl_6 right join tbl_2 on col_31 != col_51 where tbl_6.col_57 > 'SUMMER' ; +select /*+ INL_JOIN( tbl_3 , tbl_4 ) */ tbl_3.* from tbl_3 where col_18 in ( select col_22 from tbl_4 where (col_22 = 'Alice' and col_23 = 'SPRING' and col_20 = 'FALL' and col_21 = 'Newsletter' and col_24 = 'copper') or (col_22 = 'Alice' and col_23 = 'WINTER' and col_20 = 'SPRING' and col_21 = 'Magazine' and col_24 = 'silver') or (col_22 = 'David' and col_23 = 'WINTER' and col_20 = 'SUMMER' and col_21 = 'Newsletter' and col_24 = 'bronze') or (col_22 = 'David' and col_23 = 'WINTER' and col_20 = 'FALL' and col_21 = 'Newsletter' and col_24 = 'silver') ) ; +select tbl_0.* , tbl_0.* from tbl_0 left join tbl_0 on col_45 != col_45 or col_45 > col_45 where tbl_0.col_45 in ( 'WINTER' ) or tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SPRING' , 'WINTER' , 'WINTER' , 'WINTER' ) ; +select /*+ INL_HASH_JOIN( tbl_4 , tbl_5 ) */ tbl_4.* from tbl_4 where col_22 in ( select col_67 from tbl_5 where tbl_4.col_20 in ( 'SUMMER' , 'SPRING' , 'SPRING' , 'WINTER' , 'SUMMER' ) or tbl_5.col_66 in ( 'PENNY' ) ) ; +select col_30 from tbl_6 where tbl_6.col_33 <> 'Friday' ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'gold' ) ; +select /*+ */ tbl_6.* , tbl_5.col_62, tbl_5.col_67 from tbl_6 join tbl_5 ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'gold' ) ; +select tbl_4.col_69, tbl_4.col_24 , tbl_4.col_20, tbl_4.col_21 from tbl_4 right join tbl_4 on col_21 != col_20 where tbl_4.col_21 != 'Newsletter' ; +select bit_or(col_52) aggCol from (select * from tbl_1 where tbl_1.col_8 > 'FALL' or (col_7 = 'Alice') or (col_7 = 'Charlie') order by _tidb_rowid ) ordered_tbl group by col_7 for update ; +select /*+ stream_agg() */ group_concat(col_51 order by col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 != 'copper' order by _tidb_rowid ) ordered_tbl for update ; +select * from tbl_0 where tbl_0.col_45 >= 'WINTER' or tbl_0.col_45 != 'WINTER' and tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'WINTER' ) ; +select /*+ agg_to_cop() */ bit_and(col_60) aggCol from (select * from tbl_6 where tbl_6.col_60 <= 'FALL' order by col_30 ) ordered_tbl for update ; +select tbl_2.col_51 , tbl_2.* from tbl_2 join tbl_2 on col_51 <= col_51 and col_51 > col_51 or col_51 < col_51 where tbl_2.col_51 in ( 'silver' , 'silver' , 'copper' , 'copper' , 'copper' , 'silver' , 'gold' , 'copper' ) ; +select col_68 from tbl_0 where tbl_0.col_45 != 'WINTER' or tbl_0.col_45 != 'SUMMER' or tbl_0.col_45 = 'WINTER' ; +select * from tbl_3 where tbl_3.col_16 <> 'QUARTER' ; +select /*+ stream_agg() */ stddev_pop(col_15) aggCol from (select * from tbl_3 where tbl_3.col_17 < 'Charlie' order by col_15,col_19 ) ordered_tbl for update ; +select sum(col_57) aggCol from (select * from tbl_6 where tbl_6.col_31 in ( 'Monday' , 'Tuesday' ) and (col_30 = 'Sunday') or (col_30 = 'Sunday') or (col_30 = 'Saturday') order by col_30 ) ordered_tbl for update ; +select /*+ agg_to_cop() */ max(distinct col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'bronze' , 'copper' , 'copper' , 'silver' , 'copper' ) order by _tidb_rowid ) ordered_tbl for update ; +select /*+ MERGE_JOIN( tbl_6 , tbl_2 ) */ tbl_6.col_33, tbl_6.col_60 , tbl_2.col_51 from tbl_6 join tbl_2 on col_31 <= col_51 and col_60 <= col_51 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' ) ; +select col_52,col_54 from tbl_1 where tbl_1.col_63 in ( 'Alice' , 'Alice' ) for update ; +select col_57,col_60,col_31 from tbl_6 where (col_30) in (('Wednesday'), ('Saturday'), ('Tuesday')) ; +select /*+ agg_to_cop() hash_agg() */ count(col_60) aggCol from (select * from tbl_6 where tbl_6.col_57 <> null order by col_30 ) ordered_tbl group by col_57,col_60,col_33,col_43,col_31 for update ; +select * from tbl_1 where tbl_1.col_54 >= 'Newspaper' for update ; +select * from tbl_2 where tbl_2.col_51 in ( 'bronze' , 'copper' , 'bronze' , 'copper' ) ; +select /*+ HASH_JOIN( tbl_3 , tbl_5 ) */ tbl_3.* , tbl_5.* from tbl_3 join tbl_5 ; +select * from tbl_3 where tbl_3.col_17 in ( 'David' ) for update ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'silver' , 'copper' , 'copper' , 'copper' ) and tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'copper' , 'copper' , 'copper' ) for update ; +select /*+ MERGE_JOIN( tbl_3 , tbl_1 ) */ tbl_3.* from tbl_3 where col_19 in ( select col_6 from tbl_1 where tbl_3.col_53 in ( 'PENNY' ) ) ; +select * from tbl_6 where (col_31 = 'Friday') or (col_31 = 'Thursday') for update ; +select tbl_6.* , tbl_0.* from tbl_6 join tbl_0 on col_30 <= col_45 where tbl_0.col_45 != 'WINTER' ; +select /*+ */ tbl_1.* , tbl_3.* from tbl_1 join tbl_3 ; +select /*+ INL_JOIN( tbl_3 , tbl_2 ) */ tbl_3.col_18, tbl_3.col_70 , tbl_2.* from tbl_3 join tbl_2 ; +select /*+ agg_to_cop() hash_agg() */ sum(col_62) aggCol from (select * from tbl_5 where tbl_5.col_67 >= 'silver' order by _tidb_rowid ) ordered_tbl for update ; +select /*+ agg_to_cop() */ stddev_samp(col_5) aggCol from (select * from tbl_1 where tbl_1.col_5 <> 'copper' order by _tidb_rowid ) ordered_tbl group by col_5,col_52,col_9,col_54,col_8 ; +select max(col_51) aggCol from (select * from tbl_2 where tbl_2.col_51 < 'copper' or tbl_2.col_51 <> 'bronze' order by _tidb_rowid ) ordered_tbl ; +select * from tbl_2 where tbl_2.col_51 in ( 'copper' , 'copper' , 'copper' , 'copper' , 'copper' , 'copper' , 'silver' , 'silver' , 'copper' , 'bronze' , 'copper' , 'copper' , 'copper' , 'copper' , 'copper' ) for update ; +select col_15,col_59,col_42,col_18,col_19,col_58 from tbl_3 where tbl_3.col_15 in ( 'WINTER' , 'SPRING' , 'SPRING' , 'SPRING' , 'FALL' , 'WINTER' , 'SPRING' , 'SPRING' , 'WINTER' , 'SPRING' , 'WINTER' , 'SUMMER' ) and tbl_3.col_15 in ( 'SPRING' , 'SPRING' , 'SUMMER' , 'WINTER' ) for update ; +select /*+ MERGE_JOIN( tbl_0 , tbl_3 ) */ tbl_0.* , tbl_3.col_58, tbl_3.col_19, tbl_3.col_59 from tbl_0 join tbl_3 ; +select /*+ */ tbl_6.* , tbl_3.* from tbl_6 join tbl_3 ; +select /*+ stream_agg() */ var_pop(col_7) aggCol from (select * from tbl_1 where tbl_1.col_8 in ( 'FALL' , 'WINTER' , 'WINTER' ) order by _tidb_rowid ) ordered_tbl group by col_63 ; +select /*+ */ tbl_2.col_51 , tbl_1.col_63, tbl_1.col_6, tbl_1.col_52, tbl_1.col_8 from tbl_2 join tbl_1 ; +select col_60 from tbl_6 where tbl_6.col_43 <= 'Friday' ; +select * from tbl_1 where tbl_1.col_6 in ( 'Book' , 'Newsletter' , 'Newsletter' ) for update ; +select * from tbl_4 where (col_20 = 'SPRING' and col_22 = 'Bob' and col_21 = 'Newsletter' and col_23 = 'FALL' and col_24 = 'bronze') or (col_20 = 'FALL' and col_22 = 'Alice' and col_21 = 'Newsletter' and col_23 = 'SPRING' and col_24 = 'copper') ; +select * from tbl_4 where tbl_4.col_69 != 'Monday' for update ; +select /*+ agg_to_cop() hash_agg() */ group_concat(distinct col_57 order by col_57) aggCol from (select * from tbl_6 where tbl_6.col_43 in ( 'Sunday' , 'Sunday' , 'Sunday' ) or tbl_6.col_57 in ( 'WINTER' ) or (col_31) = ('Monday') or (col_31) = ('Tuesday') or (col_31) = ('Wednesday') or (col_31) = ('Friday') order by col_30 ) ordered_tbl group by col_33 for update ; +select /*+ agg_to_cop() stream_agg() */ avg(col_54) aggCol from (select * from tbl_1 where tbl_1.col_5 > 'copper' order by _tidb_rowid ) ordered_tbl ; +select /*+ INL_HASH_JOIN( tbl_6 , tbl_4 ) */ tbl_6.col_60 , tbl_4.* from tbl_6 right join tbl_4 on col_33 <> col_23 and col_30 > col_24 where tbl_6.col_43 in ( 'Monday' , 'Saturday' , 'Sunday' , 'Sunday' ) ; +select /*+ agg_to_cop() stream_agg() */ count(distinct col_42) aggCol from (select * from tbl_3 where tbl_3.col_19 >= 'Book' order by col_15,col_19 ) ordered_tbl group by col_42,col_18,col_15,col_17,col_53 for update ; +select * from tbl_3 where tbl_3.col_16 <= 'QUARTER' or (col_17, col_18) = ('Charlie', 'bronze') ; +select /*+ INL_JOIN( tbl_4 , tbl_2 ) */ tbl_4.* , tbl_2.col_51 from tbl_4 join tbl_2 on col_24 <> col_51 where tbl_2.col_51 < 'silver' or tbl_4.col_24 in ( 'copper' , 'gold' , 'gold' , 'silver' , 'bronze' , 'gold' , 'silver' , 'copper' , 'copper' ) ; +select tbl_0.col_68, tbl_0.col_45 , tbl_1.* from tbl_0 join tbl_1 on col_45 < col_5 where tbl_1.col_54 >= 'Newspaper' ; +select /*+ INL_JOIN( tbl_5 , tbl_0 ) */ tbl_5.col_67 , tbl_0.* from tbl_5 left join tbl_0 on col_62 >= col_45 or col_66 >= col_45 and col_71 <= col_45 or col_62 >= col_45 where tbl_0.col_45 > 'FALL' ; +select col_60,col_31 from tbl_6 where tbl_6.col_30 in ( 'Sunday' ) ; +select bit_or(col_20) aggCol from (select * from tbl_4 where tbl_4.col_69 in ( 'Monday' , 'Tuesday' ) order by col_20,col_22,col_21,col_23,col_24 ) ordered_tbl group by col_69,col_23 for update ; +select /*+ MERGE_JOIN( tbl_0 , tbl_1 ) */ tbl_0.* , tbl_1.* from tbl_0 left join tbl_1 on col_45 >= col_7 or col_45 >= col_5 or col_45 >= col_7 or col_68 <= col_8 where tbl_1.col_52 in ( 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Newspaper' , 'Magazine' , 'Newspaper' , 'Newspaper' , 'Newspaper' ) ; +select /*+ INL_HASH_JOIN( tbl_5 , tbl_6 ) */ tbl_5.col_67 , tbl_6.col_31 from tbl_5 join tbl_6 on col_67 < col_33 where tbl_5.col_62 in ( 'bronze' , 'gold' , 'silver' , 'gold' , 'silver' , 'silver' , 'gold' , 'gold' , 'copper' , 'gold' ) ; +select * from tbl_3 where (col_15, col_19) = ('FALL', 'Magazine') ; +select * from tbl_3 where (col_15, col_19) = ('FALL', 'Newsletter') or (col_15, col_19) = ('FALL', 'Magazine') or (col_15, col_19) = ('SUMMER', 'Newspaper') for update ; +select col_21 from tbl_4 where (col_22, col_23, col_20, col_21, col_24) in (('David', 'WINTER', 'SUMMER', 'Newspaper', 'silver')) for update ; +select tbl_6.* , tbl_4.col_23 from tbl_6 left join tbl_4 on col_30 != col_24 and col_43 < col_22 and col_31 = col_22 where tbl_4.col_21 in ( 'Newspaper' , 'Magazine' , 'Book' , 'Book' ) ; +select /*+ MERGE_JOIN( tbl_2 , tbl_3 ) */ tbl_2.* , tbl_3.col_16, tbl_3.col_59, tbl_3.col_58 from tbl_2 join tbl_3 on col_51 != col_17 where tbl_3.col_18 in ( 'bronze' , 'gold' ) ; +select col_8 from tbl_1 where tbl_1.col_6 in ( 'Newsletter' , 'Newsletter' , 'Newspaper' ) ; +select * from tbl_5 where tbl_5.col_66 != 'NICKLE' for update ; +select /*+ MERGE_JOIN( tbl_1 , tbl_3 ) */ tbl_1.col_6, tbl_1.col_9 , tbl_3.col_15, tbl_3.col_17, tbl_3.col_59, tbl_3.col_42 from tbl_1 join tbl_3 ; +select tbl_1.col_9 from tbl_1 where col_9 in ( select col_51 from tbl_2 where tbl_2.col_51 < 'silver' ) ; +select /*+ INL_HASH_JOIN( tbl_1 , tbl_6 ) */ tbl_1.col_7, tbl_1.col_5, tbl_1.col_6 , tbl_6.* from tbl_1 join tbl_6 ; +select /*+ agg_to_cop() */ stddev_pop(distinct col_8) aggCol from (select * from tbl_1 where tbl_1.col_52 <> 'Book' order by _tidb_rowid ) ordered_tbl ; +select /*+ hash_agg() */ group_concat(col_58 order by col_58) aggCol from (select * from tbl_3 where (col_70) = ('Thursday') or (col_70) = ('Monday') order by col_15,col_19 ) ordered_tbl group by col_59,col_18 for update ; +select tbl_1.col_54, tbl_1.col_8 , tbl_3.* from tbl_1 join tbl_3 on col_9 > col_15 and col_63 != col_15 and col_6 != col_53 or col_54 = col_42 or col_6 > col_16 and col_63 >= col_59 where (col_15, col_19) in (('WINTER', 'Magazine'), ('WINTER', 'Book'), ('SPRING', 'Magazine'), ('SPRING', 'Newsletter')) ; +select * from tbl_3 where tbl_3.col_58 in ( 'copper' , 'silver' ) ; +select * from tbl_2 where tbl_2.col_51 in ( 'gold' , 'silver' , 'copper' ) for update ; +select tbl_3.* , tbl_0.* from tbl_3 right join tbl_0 on col_53 = col_45 and col_58 <= col_45 where tbl_0.col_45 in ( 'WINTER' ) or tbl_0.col_68 > 'Charlie' ; +select * from tbl_4 where tbl_4.col_23 = 'SUMMER' for update ; +select tbl_5.* , tbl_5.col_67 from tbl_5 right join tbl_5 on col_67 > col_67 or col_71 <= col_67 or col_66 > col_66 and col_67 = col_67 where tbl_5.col_66 in ( 'DIME' ) ; +select col_18,col_19 from tbl_3 where tbl_3.col_19 < 'Newsletter' for update ; +select * from tbl_0 where tbl_0.col_45 in ( 'WINTER' , 'WINTER' , 'SUMMER' ) or tbl_0.col_68 >= 'Alice' for update ; +select avg(col_71) aggCol from (select * from tbl_5 where tbl_5.col_67 >= 'bronze' or tbl_5.col_67 != 'bronze' order by _tidb_rowid ) ordered_tbl ; +select col_5 from tbl_1 where tbl_1.col_7 in ( 'Charlie' , 'Bob' , 'David' , 'Charlie' , 'Alice' ) ; +select /*+ agg_to_cop() */ bit_and(col_15) aggCol from (select * from tbl_3 where tbl_3.col_58 in ( 'copper' , 'silver' , 'bronze' , 'copper' ) order by col_15,col_19 ) ordered_tbl for update ; +select /*+ MERGE_JOIN( tbl_6 , tbl_4 ) */ tbl_6.col_60, tbl_6.col_43, tbl_6.col_30 from tbl_6 where col_33 in ( select col_22 from tbl_4 where (col_23) = ('FALL') or (col_23) = ('SUMMER') or (col_23) = ('FALL') ) ; +select /*+ hash_agg() */ min(col_17) aggCol from (select * from tbl_3 where tbl_3.col_16 in ( 'PENNY' , 'NICKLE' , 'NICKLE' , 'DIME' , 'NICKLE' , 'NICKLE' , 'QUARTER' , 'PENNY' ) order by col_15,col_19 ) ordered_tbl group by col_15 ;