Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for enum #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 206 additions & 0 deletions push-down-test/prepare/0_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ;
Loading