maytasm commented on a change in pull request #9773:
URL: https://github.com/apache/druid/pull/9773#discussion_r425448336
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidJoinRule.java
##########
@@ -193,9 +193,16 @@ static boolean canHandleCondition(final RexNode condition,
final RelDataType lef
final int numLeftFields = leftRowType.getFieldCount();
for (RexNode subCondition : subConditions) {
- if (subCondition.isA(SqlKind.LITERAL)) {
- // Literals are always OK.
- literalSubConditions.add((RexLiteral) subCondition);
+ if (RexUtil.isLiteral(subCondition, true)) {
+ if (subCondition instanceof RexCall) {
+ // This is CAST(literal) which is always OK.
+ // We know that this is CASE(literal) as it pass the check from
RexUtil.isLiteral
Review comment:
Done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]