-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46519][SQL] Clear unused error classes from error-classes.json file
#44503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
286dfdc
9f5bab1
557713d
72e223f
3578d3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ import org.apache.spark.unsafe.types.UTF8String | |
| /** | ||
| * Object for grouping error messages from (most) exceptions thrown during query execution. | ||
| * This does not include exceptions thrown during the eager execution of commands, which are | ||
| * grouped into [[QueryCompilationErrors]]. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have both, AFAIK
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From the perspective of module dependency, it seems to express the meaning of Or we can write it as:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, let's leave the ref to |
||
| * grouped into [[CompilationErrors]]. | ||
| */ | ||
| private[sql] object DataTypeErrors extends DataTypeErrorsBase { | ||
| def unsupportedOperationExceptionError(): SparkUnsupportedOperationException = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -31,6 +31,7 @@ import org.apache.spark.sql.catalyst.dsl.expressions._ | |||||||||||||||||||||
| import org.apache.spark.sql.catalyst.expressions._ | ||||||||||||||||||||||
| import org.apache.spark.sql.catalyst.util.ResolveDefaultColumns | ||||||||||||||||||||||
| import org.apache.spark.sql.connector.catalog.SupportsNamespaces.PROP_OWNER | ||||||||||||||||||||||
| import org.apache.spark.sql.internal.SQLConf | ||||||||||||||||||||||
| import org.apache.spark.sql.types._ | ||||||||||||||||||||||
| import org.apache.spark.util.Utils | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
@@ -569,8 +570,10 @@ abstract class ExternalCatalogSuite extends SparkFunSuite { | |||||||||||||||||||||
| // then be caught and converted to a RuntimeException with a descriptive message. | ||||||||||||||||||||||
| case ex: RuntimeException if ex.getMessage.contains("MetaException") => | ||||||||||||||||||||||
| throw new AnalysisException( | ||||||||||||||||||||||
| errorClass = "_LEGACY_ERROR_TEMP_3066", | ||||||||||||||||||||||
| messageParameters = Map("msg" -> ex.getMessage)) | ||||||||||||||||||||||
| errorClass = "_LEGACY_ERROR_TEMP_2193", | ||||||||||||||||||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refer to this: spark/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala Lines 383 to 384 in b106f80
spark/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala Lines 1644 to 1651 in b106f80
|
||||||||||||||||||||||
| messageParameters = Map( | ||||||||||||||||||||||
| "hiveMetastorePartitionPruningFallbackOnException" -> | ||||||||||||||||||||||
| SQLConf.HIVE_METASTORE_PARTITION_PRUNING_FALLBACK_ON_EXCEPTION.key)) | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,9 @@ class QueryExecutionSuite extends SharedSparkSession { | |
|
|
||
| // Throw an AnalysisException - this should be captured. | ||
| spark.experimental.extraStrategies = Seq[SparkStrategy]( | ||
| (_: LogicalPlan) => throw new AnalysisException("_LEGACY_ERROR_TEMP_3078", Map.empty)) | ||
| (_: LogicalPlan) => throw new AnalysisException( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The UT can actually handle any type of |
||
| "UNSUPPORTED_DATASOURCE_FOR_DIRECT_QUERY", | ||
| messageParameters = Map("dataSourceType" -> "XXX"))) | ||
| assert(qe.toString.contains("org.apache.spark.sql.AnalysisException")) | ||
|
|
||
| // Throw an Error - this should not be captured. | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -2344,9 +2344,7 @@ class ParquetV2FilterSuite extends ParquetFilterSuite { | |||
|
|
||||
| checker(stripSparkFilter(query), expected) | ||||
|
|
||||
| case _ => | ||||
| throw new AnalysisException( | ||||
| errorClass = "_LEGACY_ERROR_TEMP_3078", messageParameters = Map.empty) | ||||
| case _ => assert(false, "Can not match ParquetTable in the query.") | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Refer to this: spark/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala Line 73 in b106f80
|
||||
| } | ||||
| } | ||||
| } | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reasons there is still a reference to the error class:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, remove the reference to the deleted error class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let me delete it first, and then I'll try to investigate the root cause again to see if we can automate its discovery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done