aboutsummaryrefslogtreecommitdiff
path: root/sql/hive-thriftserver
diff options
context:
space:
mode:
authorYin Huai <yhuai@databricks.com>2015-02-16 15:59:23 -0800
committerMichael Armbrust <michael@databricks.com>2015-02-16 15:59:23 -0800
commite189cbb052d59eb499dd4312403925fdd72f5718 (patch)
treea7e2424be5efbc3b45a0efb6ee7c987a3fc6c1b1 /sql/hive-thriftserver
parentcb6c48c874af2bd78ee73c1dc8a44fd28ecc0991 (diff)
downloadspark-e189cbb052d59eb499dd4312403925fdd72f5718.tar.gz
spark-e189cbb052d59eb499dd4312403925fdd72f5718.tar.bz2
spark-e189cbb052d59eb499dd4312403925fdd72f5718.zip
[SPARK-4865][SQL]Include temporary tables in SHOW TABLES
This PR adds a `ShowTablesCommand` to support `SHOW TABLES [IN databaseName]` SQL command. The result of `SHOW TABLE` has two columns, `tableName` and `isTemporary`. For temporary tables, the value of `isTemporary` column will be `false`. JIRA: https://issues.apache.org/jira/browse/SPARK-4865 Author: Yin Huai <yhuai@databricks.com> Closes #4618 from yhuai/showTablesCommand and squashes the following commits: 0c09791 [Yin Huai] Use ShowTablesCommand. 85ee76d [Yin Huai] Since SHOW TABLES is not a Hive native command any more and we will not see "OK" (originally generated by Hive's driver), use SHOW DATABASES in the test. 94bacac [Yin Huai] Add SHOW TABLES to the list of noExplainCommands. d71ed09 [Yin Huai] Fix test. a4a6ec3 [Yin Huai] Add SHOW TABLE command.
Diffstat (limited to 'sql/hive-thriftserver')
-rw-r--r--sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
index 60953576d0..8bca4b33b3 100644
--- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
+++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
@@ -121,6 +121,6 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
}
test("Single command with -e") {
- runCliWithin(1.minute, Seq("-e", "SHOW TABLES;"))("" -> "OK")
+ runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
}
}