You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/08/04 11:52:36 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #39977: [SPARK-42323][SQL] Assign name to `_LEGACY_ERROR_TEMP_2332`

cloud-fan commented on code in PR #39977:
URL: https://github.com/apache/spark/pull/39977#discussion_r1284329806


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala:
##########
@@ -78,9 +78,10 @@ class ResolveSQLOnFile(sparkSession: SparkSession) extends Rule[LogicalPlan] {
         case e: Exception =>
           // the provider is valid, but failed to create a logical plan
           u.failAnalysis(
-            errorClass = "_LEGACY_ERROR_TEMP_2332",
-            messageParameters = Map("msg" -> e.getMessage),
-            cause = e)
+            errorClass = "UNSUPPORTED_DATASOURCE_FOR_DIRECT_QUERY",
+            messageParameters = Map("dataSourceType" -> u.multipartIdentifier.head),

Review Comment:
   this is not just assigning an error class name, but changing the error message as well. It's good to put the data source type in the error message, but I don't think we can simply ignore the original error message `e.getMessage`. @itholic can you fix it?



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org