mikhailnik-db commented on code in PR #48748:
URL: https://github.com/apache/spark/pull/48748#discussion_r1842196917
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -161,6 +161,267 @@ class SQLQuerySuite extends QueryTest with
SharedSparkSession with AdaptiveSpark
}
}
+ private[this] def hexToBytes(s: String): Array[Byte] = {
+ val byteArray = BigInt(s, 16).toByteArray
+ if (byteArray.length > 1 && byteArray(0) == 0) {
+ // remove sign byte for positive numbers if exists
+ byteArray.tail
+ } else {
+ byteArray
+ }
+ }
+
+ test("listagg function") {
Review Comment:
Yes, but here there are the same concerns about non-deterministic nature we
are discussing above with @MaxGekk. And if in tests I can eventually add
something like
```Scala
checkAnswer(
sql("select string_agg(b) from df group by a"),
Row(null) :: Row(OneOf("bc", "cb")) :: Row(OneOf("cd", "dc")) :: Nil)
```
in golden files it wouldn't be so easy.
But again this problem always has been (since 2021) so probably it's not a
problem and I am too pedantic 😖
https://github.com/apache/spark/blob/b0414b19a0ea5ffa10067154c00009259419f045/sql/core/src/test/resources/sql-tests/results/group-by.sql.out#L1062-L1071
--
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]