Github user twalthr commented on a diff in the pull request: https://github.com/apache/flink/pull/4373#discussion_r131079109 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/time.scala --- @@ -355,26 +355,36 @@ case class TemporalOverlaps( rightT: RexNode, relBuilder: FlinkRelBuilder) : RexNode = { - // leftT = leftP + leftT if leftT is an interval - val convLeftT = if (isTimeInterval(leftTemporal.resultType)) { - relBuilder.call(SqlStdOperatorTable.DATETIME_PLUS, leftP, leftT) - } else { - leftT - } - // rightT = rightP + rightT if rightT is an interval - val convRightT = if (isTimeInterval(rightTemporal.resultType)) { - relBuilder.call(SqlStdOperatorTable.DATETIME_PLUS, rightP, rightT) - } else { - rightT - } - // leftT >= rightP - val leftPred = relBuilder.call(SqlStdOperatorTable.GREATER_THAN_OR_EQUAL, convLeftT, rightP) - // rightT >= leftP - val rightPred = relBuilder.call(SqlStdOperatorTable.GREATER_THAN_OR_EQUAL, convRightT, leftP) + val convLeftT = convertOverlapsEnd(relBuilder, leftP, leftT, leftTemporal.resultType) --- End diff -- Good point. I'm fine with fixing this with this PR.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---