zhengruifeng commented on code in PR #47464: URL: https://github.com/apache/spark/pull/47464#discussion_r1692601307
########## connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala: ########## @@ -1893,33 +1855,6 @@ class SparkConnectPlanner( val unit = extractString(children(0), "unit") Some(TimestampAdd(unit, children(1), children(2))) - case "window" if Seq(2, 3, 4).contains(fun.getArgumentsCount) => - val children = fun.getArgumentsList.asScala.map(transformExpression) - val timeCol = children.head - val windowDuration = extractString(children(1), "windowDuration") - var slideDuration = windowDuration - if (fun.getArgumentsCount >= 3) { - slideDuration = extractString(children(2), "slideDuration") - } - var startTime = "0 second" - if (fun.getArgumentsCount == 4) { - startTime = extractString(children(3), "startTime") - } - Some( - Alias(TimeWindow(timeCol, windowDuration, slideDuration, startTime), "window")( - nonInheritableMetadataKeys = Seq(Dataset.DATASET_ID_KEY, Dataset.COL_POS_KEY))) - - case "session_window" if fun.getArgumentsCount == 2 => - val children = fun.getArgumentsList.asScala.map(transformExpression) - val timeCol = children.head - val sessionWindow = children.last match { - case Literal(s, StringType) if s != null => SessionWindow(timeCol, s.toString) - case other => SessionWindow(timeCol, other) - } - Some( - Alias(sessionWindow, "session_window")(nonInheritableMetadataKeys = Review Comment: I think it is to be consistent with Spark Classic at that time https://github.com/apache/spark/blob/15c98e0e5e070d61e32a8eec935488efd9605480/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L5708-L5712 `as` is an alias for `name` which remove them https://github.com/apache/spark/blob/9cf6dc873ff34412df6256cdc7613eed40716570/sql/core/src/main/scala/org/apache/spark/sql/Column.scala#L1186-L1192 -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org