Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3715#discussion_r125459202
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/WindowJoinUtil.scala
---
@@ -300,22 +271,27 @@ object JoinUtil {
}
}
- val literalRex = replaceTimeFieldWithLiteral(rexNode)
+ val literalLeftRex = replaceTimeFieldWithLiteral(leftRexNode)
+ val literalRightRex = replaceTimeFieldWithLiteral(rightRexNode)
val exprReducer = new ExpressionReducer(config)
val originList = new util.ArrayList[RexNode]()
- originList.add(literalRex)
+ originList.add(literalLeftRex)
+ originList.add(literalRightRex)
val reduceList = new util.ArrayList[RexNode]()
exprReducer.reduce(rexBuilder, originList, reduceList)
- reduceList.get(0) match {
+ val literals = reduceList.map(f => f match {
case call: RexCall =>
--- End diff --
Which case is this?
Isn't a blind cast of the first operand to `RexLiteral` dangerous and could
result in a `ClassCastException`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---