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-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

Reply via email to