This is an automated email from the ASF dual-hosted git repository. sunchao pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/arrow-datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push: new 48741c0 test: Expose thrown exception when executing query in CometTPCHQuerySuite (#96) 48741c0 is described below commit 48741c0fc8842a4261217bab91fc6cf377234985 Author: Liang-Chi Hsieh <vii...@gmail.com> AuthorDate: Fri Feb 23 08:37:29 2024 -0800 test: Expose thrown exception when executing query in CometTPCHQuerySuite (#96) --- .../test/scala/org/apache/spark/sql/CometTPCHQuerySuite.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spark/src/test/scala/org/apache/spark/sql/CometTPCHQuerySuite.scala b/spark/src/test/scala/org/apache/spark/sql/CometTPCHQuerySuite.scala index 372a4cc..2264635 100644 --- a/spark/src/test/scala/org/apache/spark/sql/CometTPCHQuerySuite.scala +++ b/spark/src/test/scala/org/apache/spark/sql/CometTPCHQuerySuite.scala @@ -173,7 +173,15 @@ class CometTPCHQuerySuite extends QueryTest with CometTPCBase with SQLQueryTestH (segments(1).trim, segments(2).replaceAll("\\s+$", "")) } - assertResult(expectedSchema, s"Schema did not match\n$queryString") { + // Expose thrown exception when executing the query + val notMatchedSchemaOutput = if (schema == emptySchema) { + // There might be exception. See `handleExceptions`. + s"Schema did not match\n$queryString\nOutput/Exception: $outputString" + } else { + s"Schema did not match\n$queryString" + } + + assertResult(expectedSchema, notMatchedSchemaOutput) { schema } if (shouldSortResults) {