Skip to content
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

[SPARK-49891][SQL] Assign proper error condition for _LEGACY_ERROR_TEMP_2271 #48366

Closed
wants to merge 5 commits into from
Closed
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
10 changes: 5 additions & 5 deletions common/utils/src/main/resources/error/error-conditions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5180,6 +5180,11 @@
"message" : [
"TRIM specifier in the collation."
]
},
"UPDATE_COLUMN_NULLABILITY" : {
"message" : [
"Update column nullability for MySQL and MS SQL Server."
]
}
},
"sqlState" : "0A000"
Expand Down Expand Up @@ -7695,11 +7700,6 @@
"comment on table is not supported."
]
},
"_LEGACY_ERROR_TEMP_2271" : {
"message" : [
"UpdateColumnNullability is not supported."
]
},
"_LEGACY_ERROR_TEMP_2272" : {
"message" : [
"Rename column is only supported for MySQL version 8.0 and above."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class MsSqlServerIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JD
exception = intercept[SparkSQLFeatureNotSupportedException] {
sql(s"ALTER TABLE $tbl ALTER COLUMN ID DROP NOT NULL")
},
condition = "_LEGACY_ERROR_TEMP_2271")
condition = "UNSUPPORTED_FEATURE.UPDATE_COLUMN_NULLABILITY")
}

test("SPARK-47440: SQLServer does not support boolean expression in binary comparison") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class MySQLIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTest
exception = intercept[SparkSQLFeatureNotSupportedException] {
sql(s"ALTER TABLE $tbl ALTER COLUMN ID DROP NOT NULL")
},
condition = "_LEGACY_ERROR_TEMP_2271")
condition = "UNSUPPORTED_FEATURE.UPDATE_COLUMN_NULLABILITY")
}

override def testCreateTableWithProperty(tbl: String): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2275,7 +2275,7 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE

def unsupportedUpdateColumnNullabilityError(): SparkSQLFeatureNotSupportedException = {
new SparkSQLFeatureNotSupportedException(
errorClass = "_LEGACY_ERROR_TEMP_2271",
errorClass = "UNSUPPORTED_FEATURE.UPDATE_COLUMN_NULLABILITY",
messageParameters = Map.empty)
}

Expand Down