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/05/05 05:58:22 UTC

[GitHub] [spark] LiangchangZ commented on a change in pull request #24457: [SPARK-27340][Streaming] Alias on TimeWindow expression may cause watermark metadata lost

LiangchangZ commented on a change in pull request #24457: [SPARK-27340][Streaming] Alias on TimeWindow expression may cause watermark metadata lost
URL: https://github.com/apache/spark/pull/24457#discussion_r281005596
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/Column.scala
 ##########
 @@ -1001,17 +1001,11 @@ class Column(val expr: Expression) extends Logging {
    *   df.select($"colA".name("colB"))
    * }}}
    *
-   * If the current column has metadata associated with it, this metadata will be propagated
-   * to the new column.  If this not desired, use `as` with explicitly empty metadata.
-   *
    * @group expr_ops
    * @since 2.0.0
    */
   def name(alias: String): Column = withExpr {
-    expr match {
-      case ne: NamedExpression => Alias(expr, alias)(explicitMetadata = Some(ne.metadata))
-      case other => Alias(other, alias)()
-    }
+    Alias(expr, alias)()
 
 Review comment:
   Yes, I have successfully run all relevant UT test. 
   (I‘m sorry that we have a long holiday recently, so the reply is late.

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