kokila-19 commented on code in PR #5614: URL: https://github.com/apache/hive/pull/5614#discussion_r1945236171
########## ql/src/test/queries/clientpositive/casewhen_isnot_boolean_partition.q: ########## @@ -0,0 +1,77 @@ +create table t1(id int) partitioned by (month int, year string); +insert into t1 select 2,2,'2020'; +insert into t1 select 3,3,'2024'; +insert into t1 select 4,4,'2020'; + +select id from t1 where (CASE WHEN (month=3) THEN true else false END); +select id from t1 where (CASE WHEN (month=3) THEN false else true END); +select id from t1 where (CASE WHEN (year='2024') THEN true else false END); +select id from t1 where (CASE WHEN (year='2024') THEN false else true END); + +select id from t1 where (CASE WHEN (month=3 and year='2024') THEN true else false END); +select id from t1 where (CASE WHEN (month=3 and year='2024') THEN false else true END); + +select id from t1 where (CASE WHEN (month=3 or month=4) THEN true else false END); +select id from t1 where (CASE WHEN (month=3 or month=4) THEN false else true END); + +select id from t1 where (month=3) is not true; +select id from t1 where (month=3) is true; +select id from t1 where (month=3) is not false; +select id from t1 where (month=3) is false; + +select id from t1 where (month=3 or month=4) is not true; +select id from t1 where (month=3 or month=4) is true; +select id from t1 where (month=3 or month=4) is not false; +select id from t1 where (month=3 or month=4) is false; + +select id from t1 where (month=3 and id=3) is not true; +select id from t1 where (month=3 and id=3) is true; +select id from t1 where (month=3 and id=3) is not false; +select id from t1 where (month=3 and id=3) is false; + +select id from t1 where (month=3) and (id=3) is not true; +select id from t1 where (month=3) and (id=3) is true; +select id from t1 where (month=3) and (id=3) is not false; +select id from t1 where (month=3) and (id=3) is false; + +select id from t1 where ((month=3 or month=4) and year='2024') is not true; +select id from t1 where ((month=3 or month=4) and year='2024') is true; +select id from t1 where ((month=3 or month=4) and year='2024') is not false; +select id from t1 where ((month=3 or month=4) and year='2024') is false; + +set hive.cbo.enable=false; +select id from t1 where (CASE WHEN (month=3) THEN true else false END); +select id from t1 where (CASE WHEN (month=3) THEN false else true END); +select id from t1 where (CASE WHEN (year='2024') THEN true else false END); +select id from t1 where (CASE WHEN (year='2024') THEN false else true END); + +select id from t1 where (CASE WHEN (month=3 and year='2024') THEN true else false END); +select id from t1 where (CASE WHEN (month=3 and year='2024') THEN false else true END); + +select id from t1 where (CASE WHEN (month=3 or month=4) THEN true else false END); +select id from t1 where (CASE WHEN (month=3 or month=4) THEN false else true END); + +select id from t1 where (month=3) is not true; +select id from t1 where (month=3) is true; +select id from t1 where (month=3) is not false; +select id from t1 where (month=3) is false; + +select id from t1 where (month=3 or month=4) is not true; +select id from t1 where (month=3 or month=4) is true; +select id from t1 where (month=3 or month=4) is not false; +select id from t1 where (month=3 or month=4) is false; + +select id from t1 where (month=3 and id=3) is not true; +select id from t1 where (month=3 and id=3) is true; +select id from t1 where (month=3 and id=3) is not false; +select id from t1 where (month=3 and id=3) is false; + +select id from t1 where (month=3) and (id=3) is not true; +select id from t1 where (month=3) and (id=3) is true; +select id from t1 where (month=3) and (id=3) is not false; +select id from t1 where (month=3) and (id=3) is false; + +select id from t1 where ((month=3 or month=4) and year='2024') is not true; +select id from t1 where ((month=3 or month=4) and year='2024') is true; +select id from t1 where ((month=3 or month=4) and year='2024') is not false; +select id from t1 where ((month=3 or month=4) and year='2024') is false; Review Comment: Can you add test case for validating the third expression you have added in PartitionFilter.g4 ` | LPAREN key=identifier RPAREN NOT? IN LPAREN values=constantSeq RPAREN IS NOT? booleanLiteral # inConditionWithBoolean` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org