mirror of
https://github.com/apache/impala.git
synced 2026-01-02 12:00:33 -05:00
This commmit implements DESCRIBE DATABASE [FORMATTED|EXTENDED] <db_name>. Without FORMATTED|EXTENDED this statement only prints database's location and comment. With FORMATTED|EXTENDED it will output all the properties of the database (e.g. OWNER and PARAMETERS). Currently we only retrieve privileges stored in hive metastore. This commit also implements DESCRIBE EXTENDED <table>, which is the same as DESCRIBE FORMATTED <table> for consistency purpose. Change-Id: I2a101ec0e3d27b344fcb521eb00e5bdbcbac8986 Reviewed-on: http://gerrit.cloudera.org:8080/804 Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com> Tested-by: Internal Jenkins
65 lines
1.6 KiB
Plaintext
65 lines
1.6 KiB
Plaintext
====
|
|
---- QUERY
|
|
# Test printing of default database.
|
|
describe database default
|
|
---- RESULTS
|
|
'default','$NAMENODE/test-warehouse','Default Hive database'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
# Test printing of hive_test_desc_db database.
|
|
describe database hive_test_desc_db
|
|
---- RESULTS
|
|
'hive_test_desc_db','$NAMENODE/test-warehouse/hive_test_desc_db.db','test comment'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
# Test printing of hive_test_desc_db database with extended information.
|
|
describe database extended hive_test_desc_db
|
|
---- RESULTS
|
|
'hive_test_desc_db','$NAMENODE/test-warehouse/hive_test_desc_db.db','test comment'
|
|
'Parameter: ','',''
|
|
'','test','USER'
|
|
'Owner: ','',''
|
|
'','e','2.82'
|
|
'','pi','3.14'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
describe database extended impala_test_desc_db1
|
|
---- RESULTS
|
|
'impala_test_desc_db1','$NAMENODE/test-warehouse/impala_test_desc_db1.db',''
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
describe database extended impala_test_desc_db2
|
|
---- RESULTS
|
|
'impala_test_desc_db2','$NAMENODE/test-warehouse/impala_test_desc_db2.db','test comment'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
describe database extended impala_test_desc_db3
|
|
---- RESULTS
|
|
'impala_test_desc_db3','$NAMENODE/testdb',''
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
describe database extended impala_test_desc_db4
|
|
---- RESULTS
|
|
'impala_test_desc_db4','$NAMENODE/test2.db','test comment'
|
|
---- TYPES
|
|
string, string, string
|
|
====
|
|
---- QUERY
|
|
describe database formatted impala_test_desc_db4
|
|
---- RESULTS
|
|
'impala_test_desc_db4','$NAMENODE/test2.db','test comment'
|
|
---- TYPES
|
|
string, string, string
|
|
==== |