cloud-fan commented on code in PR #52428:
URL: https://github.com/apache/spark/pull/52428#discussion_r2415565543
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/dsl/package.scala:
##########
@@ -566,6 +566,17 @@ package object dsl extends SQLConfHelper {
}
def deduplicate(colNames: Attribute*): LogicalPlan =
Deduplicate(colNames, logicalPlan)
+
+ def watermark(expr: Expression, delayThreshold: CalendarInterval):
LogicalPlan = {
+ val namedExpression = expr match {
+ case e: NamedExpression => e
+ case e: Expression => UnresolvedAlias(e)
+ }
+ val proj = Project(Seq(namedExpression, UnresolvedStar(None)),
logicalPlan)
Review Comment:
dsl API operates on unresolved plans, so using `UnresolvedStar` is right
here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]