Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions common/utils/src/main/resources/error/error-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7334,6 +7334,15 @@
],
"sqlState" : "P0001"
},
"USER_SPECIFIED_AND_ACTUAL_SCHEMA_MISMATCH" : {
"message" : [
"The user-specified schema doesn't match the actual schema:",
"user-specified: <schema>, actual: <actualSchema>. If you're using",
"DataFrameReader.schema API or creating a table, please do not specify the schema.",
"Or if you're scanning an existed table, please drop it and re-create it."
],
"sqlState" : "42K03"
},
"USER_SPECIFIED_AND_INFERRED_SCHEMA_NOT_COMPATIBLE" : {
"message" : [
"Table '<tableName>' has a user-specified schema that is incompatible with the schema",
Expand Down Expand Up @@ -7916,14 +7925,6 @@
"A schema needs to be specified when using <className>."
]
},
"_LEGACY_ERROR_TEMP_1133" : {
"message" : [
"The user-specified schema doesn't match the actual schema:",
"user-specified: <schema>, actual: <actualSchema>. If you're using",
"DataFrameReader.schema API or creating a table, please do not specify the schema.",
"Or if you're scanning an existed table, please drop it and re-create it."
]
},
"_LEGACY_ERROR_TEMP_1134" : {
"message" : [
"Unable to infer schema for <format> at <fileCatalog>. It must be specified manually."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase with Compilat
def userSpecifiedSchemaMismatchActualSchemaError(
schema: StructType, actualSchema: StructType): Throwable = {
new AnalysisException(
errorClass = "_LEGACY_ERROR_TEMP_1133",
errorClass = "USER_SPECIFIED_AND_ACTUAL_SCHEMA_MISMATCH",
messageParameters = Map(
"schema" -> schema.toDDL,
"actualSchema" -> actualSchema.toDDL))
Expand Down