andygrove commented on code in PR #3633:
URL: https://github.com/apache/datafusion-comet/pull/3633#discussion_r2900231570
##########
spark/src/test/scala/org/apache/comet/CometSqlFileTestSuite.scala:
##########
@@ -83,39 +83,50 @@ class CometSqlFileTestSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
withTable(file.tables: _*) {
file.records.foreach {
case SqlStatement(sql, line) =>
- val location = if (line > 0) s"$relativePath:$line" else
relativePath
- withClue(s"In SQL file $location, executing statement:\n$sql\n") {
- spark.sql(sql)
+ try {
+ val location = if (line > 0) s"$relativePath:$line" else
relativePath
+ withClue(s"In SQL file $location, executing statement:\n$sql\n")
{
+ spark.sql(sql)
+ }
+ } catch {
+ case e: Exception =>
+ sys.error(s"Error executing SQL '$sql'. Reason:
'${e.getMessage}''")
Review Comment:
The original exception stack trace gets consumed. Would it be better to
rethrow?
```suggestion
throw new RuntimeException(s"Error executing SQL '$sql'", e)
```
--
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]