leonardBang commented on a change in pull request #13299:
URL: https://github.com/apache/flink/pull/13299#discussion_r502891596
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecTemporalJoin.scala
##########
@@ -59,21 +64,21 @@ class StreamExecTemporalJoin(
with StreamPhysicalRel
with StreamExecNode[RowData] {
- override def requireWatermark: Boolean = {
- val nonEquiJoinRex = getJoinInfo.getRemaining(cluster.getRexBuilder)
-
- var rowtimeJoin: Boolean = false
- val visitor = new RexVisitorImpl[Unit](true) {
- override def visitCall(call: RexCall): Unit = {
- if (call.getOperator == TEMPORAL_JOIN_CONDITION) {
- rowtimeJoin = TemporalJoinUtil.isRowtimeCall(call)
- } else {
- call.getOperands.foreach(node => node.accept(this))
- }
+ def rightInputUniqueKeyContainsJoinKey(): Boolean = {
+ val right = getInput(1)
+ val rightUniqueKeys = getCluster.getMetadataQuery.getUniqueKeys(right)
+ if (rightUniqueKeys != null) {
+ val joinKeys = keyPairs.map(_.target).toArray
+ rightUniqueKeys.exists {
+ uniqueKey => joinKeys.forall(uniqueKey.toArray.contains(_))
Review comment:
good catch
----------------------------------------------------------------
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]