diff --git a/common/utils/src/main/resources/error/error-conditions.json b/common/utils/src/main/resources/error/error-conditions.json index 492a33c574618..27d4552758f25 100644 --- a/common/utils/src/main/resources/error/error-conditions.json +++ b/common/utils/src/main/resources/error/error-conditions.json @@ -2444,6 +2444,20 @@ ], "sqlState" : "XX000" }, + "INTERNAL_ERROR_INVALID_HIVE_COLUMN_TYPE" : { + "message" : [ + "Failed to convert Hive table to Spark catalog table.", + "Database: ", + "Table: " + ], + "sqlState" : "XX000" + }, + "INTERNAL_ERROR_INVALID_PARTITION_FILTER_VALUE" : { + "message" : [ + "Partition filter value cannot contain both double quotes (\") and single quotes (')." + ], + "sqlState" : "XX000" + }, "INTERNAL_ERROR_MEMORY" : { "message" : [ "" @@ -2494,6 +2508,14 @@ ], "sqlState" : "XX000" }, + "INTERNAL_ERROR_SERDE_INTERFACE_NOT_FOUND" : { + "message" : [ + "The SerDe interface was removed since Hive 2.3 (HIVE-15167).", + "Please migrate your custom SerDes to Hive 2.3 or later.", + "For more details, see: https://issues.apache.org/jira/browse/HIVE-15167" + ], + "sqlState" : "XX000" + }, "INTERNAL_ERROR_SHUFFLE" : { "message" : [ "" @@ -9021,21 +9043,6 @@ "Cannot create staging directory: " ] }, - "_LEGACY_ERROR_TEMP_2186" : { - "message" : [ - "The SerDe interface removed since Hive 2.3(HIVE-15167). Please migrate your custom SerDes to Hive 2.3. See HIVE-15167 for more details." - ] - }, - "_LEGACY_ERROR_TEMP_2187" : { - "message" : [ - ", db: , table: ." - ] - }, - "_LEGACY_ERROR_TEMP_2192" : { - "message" : [ - "Partition filter cannot have both `\"` and `'` characters." - ] - }, "_LEGACY_ERROR_TEMP_2194" : { "message" : [ "Unsupported Hive Metastore version . Please set with a valid version." diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala index cb3c063f434e4..3f14eaa45cfce 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala @@ -1629,17 +1629,16 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE def serDeInterfaceNotFoundError(e: NoClassDefFoundError): SparkClassNotFoundException = { new SparkClassNotFoundException( - errorClass = "_LEGACY_ERROR_TEMP_2186", - messageParameters = Map.empty, + errorClass = "INTERNAL_ERROR_SERDE_INTERFACE_NOT_FOUND", + messageParameters = Map.empty[String, String], cause = e) } def convertHiveTableToCatalogTableError( e: SparkException, dbName: String, tableName: String): Throwable = { new SparkException( - errorClass = "_LEGACY_ERROR_TEMP_2187", + errorClass = "INTERNAL_ERROR_INVALID_HIVE_COLUMN_TYPE", messageParameters = Map( - "message" -> e.getMessage, "dbName" -> dbName, "tableName" -> tableName), cause = e) @@ -1661,8 +1660,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE } def invalidPartitionFilterError(): SparkUnsupportedOperationException = { - new SparkUnsupportedOperationException( - errorClass = "_LEGACY_ERROR_TEMP_2192") + new SparkUnsupportedOperationException("INTERNAL_ERROR_INVALID_PARTITION_FILTER_VALUE") } def getPartitionMetadataByFilterError(e: Exception): SparkRuntimeException = {