HyukjinKwon commented on code in PR #43352: URL: https://github.com/apache/spark/pull/43352#discussion_r1427415118
########## connector/connect/server/src/main/scala/org/apache/spark/sql/connect/utils/ErrorUtils.scala: ########## @@ -115,6 +115,17 @@ private[connect] object ErrorUtils extends Logging { if (sparkThrowable.getErrorClass != null) { sparkThrowableBuilder.setErrorClass(sparkThrowable.getErrorClass) } + for (queryCtx <- sparkThrowable.getQueryContext) { + sparkThrowableBuilder.addQueryContexts( + FetchErrorDetailsResponse.QueryContext + .newBuilder() + .setObjectType(queryCtx.objectType()) + .setObjectName(queryCtx.objectName()) + .setStartIndex(queryCtx.startIndex()) Review Comment: @MaxGekk I think there's a bug not only here but without Spark Connect. ```scala scala> try { | spark.range(1).select("a") | } catch { | case e: org.apache.spark.sql.catalyst.ExtendedAnalysisException => println(e.getQueryContext) | } [Lorg.apache.spark.QueryContext;@6a9d7514 val res2: Any = () ``` It doesn't contain `QueryContext` from https://github.com/apache/spark/pull/43334 .. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org