rubenada commented on code in PR #6523:
URL: https://github.com/apache/hive/pull/6523#discussion_r3830973549
##########
ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out:
##########
@@ -581,10 +581,10 @@ STAGE PLANS:
Map Operator Tree:
TableScan
alias: srcpart
- filterExpr: CAST( ds AS DATE) is not null (type: boolean)
+ filterExpr: day(CAST( ds AS DATE)) is not null (type:
boolean)
Review Comment:
Overriding isSafeOperator should work, because [Calcite's RexSimplifier uses
this
method](https://github.com/apache/calcite/blob/197d569217eda062142d2e9164a8e00a1db6ab61/core/src/main/java/org/apache/calcite/rex/RexSimplify.java#L1624)
(apart from checking some harcoded ops) to consider if an operator is safe:
```
if (sqlOperator.isSafeOperator()
|| RexUtil.isLosslessCast(call)
|| safeOps.contains(sqlKind)
|| safeOperators.contains(sqlOperator)) {
...
}
```
Created https://issues.apache.org/jira/browse/HIVE-29833 as follow-up
--
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]