> On April 13, 2016, 3:12 p.m., Ashutosh Chauhan wrote:
> > In hive-schema-2.1-***.sql instead of adding run <script-name> you may just 
> > inline new create table statements which is consistent with other create 
> > table statements there.

Ok makes sense. Will do it in the new upload.


> On April 13, 2016, 3:12 p.m., Ashutosh Chauhan wrote:
> > metastore/if/hive_metastore.thrift, lines 62-63
> > <https://reviews.apache.org/r/45406/diff/4/?file=1341804#file1341804line62>
> >
> >     fk_constraint_name, pk_constraint_name ?

The naming convention is based on 
https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getPrimaryKeys(java.lang.String,%20java.lang.String,%20java.lang.String).


> On April 13, 2016, 3:12 p.m., Ashutosh Chauhan wrote:
> > metastore/if/hive_metastore.thrift, line 49
> > <https://reviews.apache.org/r/45406/diff/4/?file=1341804#file1341804line49>
> >
> >     should this be called constraint name ?

https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getPrimaryKeys(java.lang.String,%20java.lang.String,%20java.lang.String)
 is the naming standard followed


> On April 13, 2016, 3:12 p.m., Ashutosh Chauhan wrote:
> > metastore/scripts/upgrade/mssql/019-HIVE-13076.mssql.sql, line 1
> > <https://reviews.apache.org/r/45406/diff/4/?file=1341808#file1341808line1>
> >
> >     IF NOT Exists missing

Create table without an IF NOT EXISTS is in convention with the create 
statements in the *mssql.sql files. I added "IF EXISTS" on oracle/postgres 
scripts based on the comments. But in hindsight, it is not necessary/rather may 
be a bad approach to add the IF NOT Exists clause since we should throw error 
if the table already exists and not silently ignore the create statement which 
can cause issue if the already existing table definition is not the same as the 
one expected by hive.


- Hari Sankar


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45406/#review128681
-----------------------------------------------------------


On April 12, 2016, 8:47 p.m., Hari Sankar Sivarama Subramaniyan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45406/
> -----------------------------------------------------------
> 
> (Updated April 12, 2016, 8:47 p.m.)
> 
> 
> Review request for hive and Ashutosh Chauhan.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Metastore Changes : API calls for retrieving primary keys and foreign keys 
> information
> 
> 
> Diffs
> -----
> 
>   metastore/if/hive_metastore.thrift 6a55962 
>   metastore/scripts/upgrade/derby/034-HIVE-13076.derby.sql PRE-CREATION 
>   metastore/scripts/upgrade/derby/hive-schema-2.1.0.derby.sql 42f4eb6 
>   metastore/scripts/upgrade/derby/upgrade-2.0.0-to-2.1.0.derby.sql a0bac3c 
>   metastore/scripts/upgrade/mssql/019-HIVE-13076.mssql.sql PRE-CREATION 
>   metastore/scripts/upgrade/mssql/hive-schema-2.1.0.mssql.sql cf5a662 
>   metastore/scripts/upgrade/mssql/upgrade-2.0.0-to-2.1.0.mssql.sql f25daf2 
>   metastore/scripts/upgrade/mysql/034-HIVE-13076.mysql.sql PRE-CREATION 
>   metastore/scripts/upgrade/mysql/hive-schema-2.1.0.mysql.sql 6fd3209 
>   metastore/scripts/upgrade/mysql/upgrade-2.0.0-to-2.1.0.mysql.sql e790636 
>   metastore/scripts/upgrade/oracle/034-HIVE-13076.oracle.sql PRE-CREATION 
>   metastore/scripts/upgrade/oracle/hive-schema-2.1.0.oracle.sql 774f6be 
>   metastore/scripts/upgrade/oracle/upgrade-2.0.0-to-2.1.0.oracle.sql 8368d08 
>   metastore/scripts/upgrade/postgres/033-HIVE-13076.postgres.sql PRE-CREATION 
>   metastore/scripts/upgrade/postgres/hive-schema-2.1.0.postgres.sql 7463a37 
>   metastore/scripts/upgrade/postgres/upgrade-2.0.0-to-2.1.0.postgres.sql 
> 6172407 
>   metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> c9fadad 
>   
> metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 
> 64a26ac 
>   metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 
> 39cf927 
>   metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java 
> 06e9f78 
>   metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> ac293b9 
>   metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java e49f757 
>   metastore/src/java/org/apache/hadoop/hive/metastore/hbase/HBaseStore.java 
> a73dbeb 
>   metastore/src/model/org/apache/hadoop/hive/metastore/model/MConstraint.java 
> PRE-CREATION 
>   metastore/src/model/package.jdo 7385a13 
>   
> metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreControlledCommit.java
>  94ca835 
>   
> metastore/src/test/org/apache/hadoop/hive/metastore/DummyRawStoreForJdoConnection.java
>  b108f95 
> 
> Diff: https://reviews.apache.org/r/45406/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Hari Sankar Sivarama Subramaniyan
> 
>

Reply via email to