HIVE-675: Add database/scheme support Hive QL

Review Request #508 — Created Aug. 4, 2010 and submitted

carlsteinbach
old-Hive git
trunk
HIVE-675
hive
Database/Scheme support for Hive.

* Implemented 'SHOW DATABASES' command
* Refactored TestHiveMetaStore and enabled tests for remote metastore client.
* Added launch configurations for TestHiveMetaStore and TestHiveMetaStoreRemote


jsichi
  1. 
      
  2. metastore/src/model/package.jdo (Diff revision 2)
     
     
    Do we really need to change this column name?  I can see that it doesn't follow the conventions for other tables, but it might make upgrades a pain.
    
  3. Should this be db_name instead of tab_name?
  4. 
      
namit
  1. 
      
  2. metastore/if/hive_metastore.thrift (Diff revision 2)
     
     
    Same as John's earlier comment - do we need
    to change the name.
    
    No-one is using this table in the metastore currently,
    so it might be OK - but not sure, how JDO would 
    handle renaming a column
  3. remove KW_SCHEMAS
    1. In MySQL SHOW SCHEMAS is a synonym for SHOW DATABASES as of version 5.0.2. I think the general convention in Hive is to mimic the behavior of MySQL. Please let me know if there is a reason why we should not do that here.
      
      http://dev.mysql.com/doc/refman/5.0/en/show-databases.html
       
  4. also add a test for 'show databases for a pattern'
  5. 
      
carlsteinbach
carlsteinbach
namit
  1. 
      
  2. metastore/src/model/package.jdo (Diff revision 4)
     
     
    Why do you want to change the field name ?
    1. I changed it since this refers to the value of the COMMENT clause in the CREATE DATABASE statement. I changed it back to the original value just to keep things simple.
  3. 
      
carlsteinbach
Review request changed

Change Summary:

HIVE-675.12.patch.txt:

* Added HiveMetaStore.getAllTables(String dbName) and HiveMetaStore.getAllDatabases()
* Added ORDER BY clause to ObjectStore.getDatabases()
* Reverted Database.getComment() to Database.getDescription()
* Replaced a couple more hardcoded references to DEFAULT_DATABASE_NAME

Diff:

Revision 5 (+9759 -3462)

Show changes

tedyu
  1. 
      
  2. metastore/src/model/package.jdo (Diff revision 4)
     
     
    name= should be changed as well.
    1. "DESC" is the name of a column that already exists in the schema. The name is not optimal, but changing it presents a bigger inconvenience.
  3. 
      
Loading...