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 2020/04/27 06:00:36 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #28326: [SPARK-27340][SS] Alias on TimeWindow expression cause watermark metadata lost

cloud-fan commented on a change in pull request #28326:
URL: https://github.com/apache/spark/pull/28326#discussion_r415531970



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -3262,10 +3262,21 @@ object CleanupAliases extends Rule[LogicalPlan] {
 
   def trimNonTopLevelAliases(e: Expression): Expression = e match {
     case a: Alias =>
-      a.copy(child = trimAliases(a.child))(
+      val newChild = trimAliases(a.child)
+      // Specific logic for keeping the eventTime watermark metadata in the top level alias.

Review comment:
       can we make it general? I think what we need to do is to propagate the alias metadata when there are contiguous Alias nodes and we merge them into one.




----------------------------------------------------------------
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



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