Github user hvanhovell commented on the issue:
https://github.com/apache/spark/pull/17039
A small follow-up (I got the code to run). We could use the following in
`SQLQueryTestSuite.getNormalizedResult`:
```scala
val baseDf = session.sql(sql)
val (df, isSorted) = baseDf.logicalPlan match {
case Sort(ordering, true, child) =>
val sort = Sort(ordering ++ child.output.map(SortOrder(_,
Ascending)), true, child)
(Dataset.ofRows(session, sort), true)
case _ =>
(baseDf, false)
}
val schema = df.schema
// Get answer, but also get rid of the #1234 expression ids that show
up in explain plans
val answer =
df.queryExecution.hiveResultString().map(_.replaceAll("#\\d+", "#x"))
// If the output is not pre-sorted, sort it.
if (isSorted) (schema, answer) else (schema, answer.sorted)
```
If I run this, it also changes results in the following files:
- group-analytics.sql.out
- in-set-operations.sql.out
- order-by-nulls-ordering.sql.out
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]