gengliangwang commented on code in PR #53659:
URL: https://github.com/apache/spark/pull/53659#discussion_r2658503524
##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala:
##########
@@ -452,9 +451,24 @@ private[hive] class SparkSQLCLIDriver extends CliDriver
with Logging {
case _ => t.getMessage
}
err.println(msg)
- if (format == ErrorMessageFormat.PRETTY &&
- !sessionState.getIsSilent &&
- (!t.isInstanceOf[AnalysisException] || t.getCause != null)) {
+ // Print stack traces based on format and error type:
+ // - DEBUG format: Always print stack traces (for debugging)
+ // - PRETTY format: Only for internal errors (SQLSTATE XX***)
+ // - MINIMAL/STANDARD formats: Never print stack traces (JSON
only)
+ val shouldPrintStackTrace = format match {
Review Comment:
QQ: is the change for `spark-sql` only? What about `spark-shell` and
`pyspark`?
--
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]