Skip to content

Commit

Permalink
[SPARK-49078][SQL][FOLLOWUP] Clear unused showColumnsNotSupportedForV…
Browse files Browse the repository at this point in the history
…2TablesError in QueryCompilationErrors and add more uts

### What changes were proposed in this pull request?

Clear unused error methods in QueryCompilationErrors.

### Why are the changes needed?

Due to had support show columns in v2 table(apache#47568), so the check method is not needed any more.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

not need

### Was this patch authored or co-authored using generative AI tooling?

Closes apache#47701 from xuzifu666/rm_showcolumnsv2.

Lead-authored-by: xuyu <11161569@vivo.com>
Co-authored-by: xuzifu666 <1206332514@qq.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
2 people authored and IvanK-db committed Sep 19, 2024
1 parent cb2fef6 commit b477a7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1593,10 +1593,6 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase with Compilat
notSupportedForV2TablesError("SHOW CREATE TABLE AS SERDE")
}

def showColumnsNotSupportedForV2TablesError(): Throwable = {
notSupportedForV2TablesError("SHOW COLUMNS")
}

def repairTableNotSupportedForV2TablesError(): Throwable = {
notSupportedForV2TablesError("MSCK REPAIR TABLE")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2374,6 +2374,8 @@ class DataSourceV2SQLSuiteV1Filter
val t = "testcat.ns1.ns2.tbl"
withTable(t) {
spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo")
checkAnswer(sql(s"SHOW COLUMNS FROM $t IN testcat.ns1.ns2"), Seq(Row("id"), Row("data")))
checkAnswer(sql(s"SHOW COLUMNS in $t"), Seq(Row("id"), Row("data")))
checkAnswer(sql(s"SHOW COLUMNS FROM $t"), Seq(Row("id"), Row("data")))
}
}
Expand Down

0 comments on commit b477a7c

Please sign in to comment.