ghanko commented on code in PR #3592:
URL: https://github.com/apache/hive/pull/3592#discussion_r973559351
##########
ql/src/test/queries/clientpositive/vector_struct_in2.q:
##########
@@ -0,0 +1,22 @@
+set hive.fetch.task.conversion=none;
+
+create table test (a string) partitioned by (y string, m string);
+insert into test values ('aa', 2022, 9);
+
+--original bug report
+select * from test where (y=year(date_sub('2022-09-11',4)) and
m=month(date_sub('2022-09-11',4))) or (y=year(date_sub('2022-09-11',10)) and
m=month(date_sub('2022-09-11',10)) );
+
+set hive.optimize.point.lookup=false;
+set hive.cbo.enable=false;
+
+--embedded expression in struct
+select * from test where (struct(cast(y as int)) IN (struct(2022)));
+
+--first argument of in expression is const struct
+select * from test where (struct(2022) IN (struct(2022)));
+
+set hive.optimize.constant.propagation=false;
Review Comment:
Constant propagation optimizer optimizes the filter out so the issue is not
reproducible if it is turned on. I'm going to add some comments to the test to
make these clear.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]