soumyakanti3578 commented on code in PR #5196:
URL: https://github.com/apache/hive/pull/5196#discussion_r1927755159
##########
ql/src/test/results/clientpositive/llap/pcs.q.out:
##########
@@ -1286,16 +1293,18 @@ PREHOOK: type: QUERY
PREHOOK: Input: default@pcs_t1
PREHOOK: Input: default@pcs_t1@ds=2000-04-08
PREHOOK: Input: default@pcs_t1@ds=2000-04-09
+PREHOOK: Input: default@pcs_t1@ds=2000-04-10
#### A masked pattern was here ####
POSTHOOK: query: explain extended select ds from pcs_t1 where struct(ds, key,
rand(100)) in (struct('2000-04-08',1,0.2), struct('2000-04-09',2,0.3))
POSTHOOK: type: QUERY
POSTHOOK: Input: default@pcs_t1
POSTHOOK: Input: default@pcs_t1@ds=2000-04-08
POSTHOOK: Input: default@pcs_t1@ds=2000-04-09
+POSTHOOK: Input: default@pcs_t1@ds=2000-04-10
#### A masked pattern was here ####
OPTIMIZED SQL: SELECT `ds`
FROM `default`.`pcs_t1`
-WHERE (`ds`, `key`, RAND(100)) IN ( ('2000-04-08', 1, 0.2), ('2000-04-09',
2, 0.3))
+WHERE (`ds`, `key`, RAND(100)) = ('2000-04-08', 1, 0.2) OR (`ds`, `key`,
RAND(100)) = ('2000-04-09', 2, 0.3)
Review Comment:
I am removing the `rand` function from this test as it doesn't seem
necessary. Non deterministic functions prevent the transformation of INs and
BETWEENs to a SEARCH operator, and instead we get an expanded expression like
above. This further prevents partition pruning as seen below.
I am removing the random function from here but adding tests in `search.q`
that shows the behaviour of predicates with non-deterministic function.
--
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]