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
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 @@ -9129,6 +9129,11 @@
"The target JDBC server hosting table <tableName> does not support ALTER TABLE with multiple actions. Split the ALTER TABLE up into individual actions to avoid this error."
]
},
"NESTED_COLUMN" : {
"message" : [
"<command> does not support nested column `<column>`."
]
},
"OBJECT_LEVEL_COLLATIONS" : {
"message" : [
"Default collation for the specified object."
Expand Down Expand Up @@ -10294,11 +10299,6 @@
"STORED AS with file format '<serdeInfo>' is invalid."
]
},
"_LEGACY_ERROR_TEMP_1060" : {
"message" : [
"<command> does not support nested column: <column>."
]
},
"_LEGACY_ERROR_TEMP_1068" : {
"message" : [
"<database> is a system preserved database, you cannot use it as current database. To access global temporary views, you should use qualified name with the GLOBAL_TEMP_DATABASE, e.g. SELECT * FROM <database>.viewName."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase with Compilat

def commandNotSupportNestedColumnError(command: String, quoted: String): Throwable = {
new AnalysisException(
errorClass = "_LEGACY_ERROR_TEMP_1060",
errorClass = "UNSUPPORTED_FEATURE.NESTED_COLUMN",
messageParameters = Map(
"command" -> command,
"column" -> quoted))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class DataSourceV2SQLSuiteV1Filter
sql(s"CREATE TABLE $t (d struct<a: INT, b: INT>) USING foo")
checkError(
exception = analysisException(s"describe $t d.a"),
condition = "_LEGACY_ERROR_TEMP_1060",
condition = "UNSUPPORTED_FEATURE.NESTED_COLUMN",
parameters = Map(
"command" -> "DESC TABLE COLUMN",
"column" -> "d.a"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,14 @@ trait DescribeTableSuiteBase extends QueryTest with DDLCommandTestUtils {
test("describe a nested column") {
withNamespaceAndTable("ns", "tbl") { tbl =>
sql(s"CREATE TABLE $tbl (`a.b` int, col struct<x:int, y:string>) $defaultUsing")
val errMsg = intercept[AnalysisException] {
sql(s"DESCRIBE TABLE $tbl col.x")
}.getMessage
assert(errMsg === "DESC TABLE COLUMN does not support nested column: col.x.")
checkError(
exception = intercept[AnalysisException] {
sql(s"DESCRIBE TABLE $tbl col.x")
},
condition = "UNSUPPORTED_FEATURE.NESTED_COLUMN",
parameters = Map(
"command" -> "DESC TABLE COLUMN",
"column" -> "col.x"))
}
}

Expand Down