You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/03 02:26:01 UTC

[GitHub] [spark] yaooqinn commented on a change in pull request #26702: [SPARK-30070][SQL] Support ANSI datetimes predicate - overlaps

yaooqinn commented on a change in pull request #26702: [SPARK-30070][SQL] Support ANSI datetimes predicate - overlaps
URL: https://github.com/apache/spark/pull/26702#discussion_r352957489
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
 ##########
 @@ -246,6 +248,32 @@ class Analyzer(
       CleanupAliases)
   )
 
+  /**
+   * Replace interval with startEnd + interval and substitute child plan with DateTimeOverlaps.
+   */
+  object ResolveDateTimeOverlaps extends Rule[LogicalPlan] {
+    def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperatorsUp {
+      case p: LogicalPlan => p.transformAllExpressions {
+        case u @ UnresolvedDateTimeOverlaps(leftStart, leftEnd, rightStart, rightEnd) =>
+          withPosition(u) {
+            u.checkInputDataTypes() match {
 
 Review comment:
   no, we cannot. It‘s `RuntimeReplaceable`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org