EnricoMi commented on code in PR #43519:
URL: https://github.com/apache/spark/pull/43519#discussion_r1403202213
##########
sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala:
##########
@@ -1024,6 +1024,27 @@ class DatasetSuite extends QueryTest
assert(namedObservation.get === expected)
}
+ test("SPARK-45656: named observations with the same name on different
datasets") {
+ val namedObservation1 = Observation("named")
+ val df1 = spark.range(50)
+ val observed_df1 = df1.observe(
+ namedObservation1, count(lit(1)).as("count"))
Review Comment:
There is a rule that enforces that `name` is unique within a plan (except
for identical expressions: self-joins).
Could we have some similar check across the spark session?
--
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]