[
https://issues.apache.org/jira/browse/FLINK-6429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112399#comment-16112399
]
ASF GitHub Bot commented on FLINK-6429:
---------------------------------------
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.
> Bump up Calcite version to 1.13
> -------------------------------
>
> Key: FLINK-6429
> URL: https://issues.apache.org/jira/browse/FLINK-6429
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Haohui Mai
>
> This is an umbrella issue for all tasks that need to be done once Apache
> Calcite 1.13 is released.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)