jerrypeng commented on code in PR #39931:
URL: https://github.com/apache/spark/pull/39931#discussion_r1119290314
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/statefulOperators.scala:
##########
@@ -324,6 +349,41 @@ object WatermarkSupport {
}
Some(evictionExpression)
}
+
+ /**
+ * Find the column which is marked as "event time" column.
+ *
+ * If there are multiple event time columns in given column list, the
behavior depends on the
+ * parameter `useFirstOccurrence`. If it's set to true, the first occurred
column will be
+ * returned. If not, this method will throw an AnalysisException as it is
not allowed to have
+ * multiple event time columns.
+ */
+ def findEventTimeColumn(
+ attrs: Seq[Attribute],
+ useFirstOccurrence: Boolean): Option[Attribute] = {
Review Comment:
The name for this variable is kind of confusing. Can we rename it something
like "allowMultipleEventTimeColumns"?
--
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]