-
- Downloads
[SPARK-15952][SQL] fix "show databases" ordering issue
## What changes were proposed in this pull request? Two issues I've found for "show databases" command: 1. The returned database name list was not sorted, it only works when "like" was used together; (HIVE will always return a sorted list) 2. When it is used as sql("show databases").show, it will output a table with column named as "result", but for sql("show tables").show, it will output the column name as "tableName", so I think we should be consistent and use "databaseName" at least. ## How was this patch tested? Updated existing test case to test its ordering as well. Author: bomeng <bmeng@us.ibm.com> Closes #13671 from bomeng/SPARK-15952.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala 1 addition, 1 deletion...g/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/databases.scala 2 additions, 2 deletions...la/org/apache/spark/sql/execution/command/databases.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 3 additions, 3 deletions...ala/org/apache/spark/sql/execution/command/DDLSuite.scala
Loading
Please register or sign in to comment