Hi, Dear
Create table t (a integer not null, b integer not null, c integer not null, d integer constraint pk primary key (a, b, c)); SQL1 : select * from t where (a,d) in ( (1,4) , (2, 3)) SQL2 : select * from t where (d,a) in ( (4,1) , (3,2)) SQL1 and SQL2 have different execute plan, the SQL2’s plan is not correct. Found in branch 3.2 See below log: 0: jdbc:phoenix:localhost> explain select * from t where (a,d) in ((1,4),(2, 3)); +------------------------------------------+ | PLAN | +------------------------------------------+ | CLIENT 1-CHUNK PARALLEL 1-WAY SKIP SCAN ON 2 KEYS OVER T [1] - [2] | | SERVER FILTER BY (A, D) IN ([128,0,0,1,128,0,0,4],[128,0,0,2,128,0,0,3]) | +------------------------------------------+ 2 rows selected (0.032 seconds) 0: jdbc:phoenix:localhost> explain select * from t where (d,a) in ((4,1),(3, 2)); +------------------------------------------+ | PLAN | +------------------------------------------+ | CLIENT 1-CHUNK PARALLEL 1-WAY SKIP SCAN ON 2 KEYS OVER T [3] - [4] | +------------------------------------------+ 1 row selected (0.031 seconds) Daniel meng