EnricoMi commented on a change in pull request #33545:
URL: https://github.com/apache/spark/pull/33545#discussion_r680673878
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -701,6 +701,57 @@ class DatasetSuite extends QueryTest
1 -> "a", 2 -> "bc", 3 -> "d")
}
+ test("SPARK-34806: observation on datasets") {
+ val namedObservation = Observation("named")
+ val unnamedObservation = Observation()
+
+ val df = spark.range(100)
+ val observed_df = df
+ .observe(
+ namedObservation,
+ min($"id").as("min_val"),
+ max($"id").as("max_val"),
+ sum($"id").as("sum_val"),
Review comment:
Yes, It behaves identical to `Row.getValuesMap(Row.schema.fieldNames)`,
which drops all but the last occurrence of a column name.
--
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]