You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HeartSaVioR (via GitHub)" <gi...@apache.org> on 2023/12/01 02:35:03 UTC

Re: [PR] [SPARK-45888][SS] Apply error class framework to State (Metadata) Data Source [spark]

HeartSaVioR commented on code in PR #44025:
URL: https://github.com/apache/spark/pull/44025#discussion_r1411532708


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/state/StateScanBuilder.scala:
##########
@@ -67,8 +67,7 @@ class StateScan(
     })
 
     if (partitions.headOption.isEmpty) {
-      throw new IllegalArgumentException("The state does not have any partition. Please double " +
-        s"check that the query points to the valid state. options: $sourceOptions")
+      throw StateDataSourceErrors.noPartitionDiscoveredInStateStore(sourceOptions)

Review Comment:
   How we deal with internal error for data source? Do we think it won't matter if we use a single error class for all of internal errors, among engine and data sources? 



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