peter-toth commented on a change in pull request #26028:
[SPARK-29359][SQL][TESTS] Better exception handling in
(SQL|ThriftServer)QueryTestSuite
URL: https://github.com/apache/spark/pull/26028#discussion_r332185420
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
##########
@@ -388,49 +390,52 @@ class SQLQueryTestSuite extends QueryTest with
SharedSparkSession {
}
}
- /** Executes a query and returns the result as (schema of the output,
normalized output). */
- private def getNormalizedResult(session: SparkSession, sql: String):
(StructType, Seq[String]) = {
- // Returns true if the plan is supposed to be sorted.
- def isSorted(plan: LogicalPlan): Boolean = plan match {
- case _: Join | _: Aggregate | _: Generate | _: Sample | _: Distinct =>
false
- case _: DescribeCommandBase
- | _: DescribeColumnCommand
- | _: DescribeTableStatement
- | _: DescribeColumnStatement => true
- case PhysicalOperation(_, _, Sort(_, true, _)) => true
- case _ => plan.children.iterator.exists(isSorted)
- }
-
+ protected def handleExceptions(result: => (String, Seq[String])): (String,
Seq[String]) = {
Review comment:
I've added a description to it and to its override.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]