You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Jason Dere <jd...@hortonworks.com> on 2015/03/20 20:22:55 UTC

Review Request 32324: HIVE-10037 JDBC support for interval expressions

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

Review request for hive, Ashutosh Chauhan and Thejas Nair.


Bugs: HIVE-10037
    https://issues.apache.org/jira/browse/HIVE-10037


Repository: hive-git


Description
-------

There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().


Diffs
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
  jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
  jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
  jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b9e15a1 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java 1b708dd 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java 07ea8b9 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java 386fef9 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/PropValueUnion.java aa56dc9 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/SetIntString.java 676f2b2 
  service/if/TCLIService.thrift 6f1a4ca 
  service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp f20f38f 
  service/src/gen/thrift/gen-cpp/TCLIService_types.h d2942ab 
  service/src/gen/thrift/gen-cpp/TCLIService_types.cpp 326d25b 
  service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java 745e6cc 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBinaryColumn.java 1ac28a2 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBoolColumn.java b2bda35 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TByteColumn.java defdec0 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java c290ed8 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TDoubleColumn.java 88926c8 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetTablesReq.java d0c3059 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI16Column.java e997bd9 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI32Column.java 3cdd2a5 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI64Column.java c8fc41f 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionReq.java 6aa7c43 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java 28706be 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java ad54ff3 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRow.java 8e58aa5 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRowSet.java 4bb5749 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStatus.java cb5010f 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStringColumn.java 5398056 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTableSchema.java e2882c2 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeDesc.java d6a6d23 
  service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java b857367 
  service/src/gen/thrift/gen-py/TCLIService/constants.py 9b1e2f7 
  service/src/gen/thrift/gen-py/TCLIService/ttypes.py 0957c12 
  service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb 1c9b91c 
  service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb 220434e 
  service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
  service/src/java/org/apache/hive/service/cli/Type.java 92d237d 

Diff: https://reviews.apache.org/r/32324/diff/


Testing
-------

Added test to TestJdbcDriver2


Thanks,

Jason Dere


Re: Review Request 32324: HIVE-10037 JDBC support for interval expressions

Posted by Thejas Nair <th...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32324/#review78882
-----------------------------------------------------------

Ship it!


Ship It!

- Thejas Nair


On April 1, 2015, 9:07 p.m., Jason Dere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32324/
> -----------------------------------------------------------
> 
> (Updated April 1, 2015, 9:07 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Thejas Nair.
> 
> 
> Bugs: HIVE-10037
>     https://issues.apache.org/jira/browse/HIVE-10037
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
> Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
>   jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
>   jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
>   metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 3f4cfed 
>   service/if/TCLIService.thrift 6f1a4ca 
>   service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
>   service/src/java/org/apache/hive/service/cli/Type.java 92d237d 
> 
> Diff: https://reviews.apache.org/r/32324/diff/
> 
> 
> Testing
> -------
> 
> Added test to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Jason Dere
> 
>


Re: Review Request 32324: HIVE-10037 JDBC support for interval expressions

Posted by Jason Dere <jd...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32324/
-----------------------------------------------------------

(Updated April 1, 2015, 9:07 p.m.)


Review request for hive, Ashutosh Chauhan and Thejas Nair.


Changes
-------

Change hiveTypeToSqlType() to use typeStringToHiveType()


Bugs: HIVE-10037
    https://issues.apache.org/jira/browse/HIVE-10037


Repository: hive-git


Description
-------

There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
  jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
  jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
  jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 3f4cfed 
  service/if/TCLIService.thrift 6f1a4ca 
  service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
  service/src/java/org/apache/hive/service/cli/Type.java 92d237d 

Diff: https://reviews.apache.org/r/32324/diff/


Testing
-------

Added test to TestJdbcDriver2


Thanks,

Jason Dere


Re: Review Request 32324: HIVE-10037 JDBC support for interval expressions

Posted by Jason Dere <jd...@hortonworks.com>.

> On April 1, 2015, 1:34 a.m., Thejas Nair wrote:
> > jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java, line 167
> > <https://reviews.apache.org/r/32324/diff/2/?file=901924#file901924line167>
> >
> >     can we re-use typeStringToHiveType here ?
> >     I see void and null as only things that need to be handled separately.

that makes sense, I can make that change


- Jason


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


On March 20, 2015, 11:48 p.m., Jason Dere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32324/
> -----------------------------------------------------------
> 
> (Updated March 20, 2015, 11:48 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Thejas Nair.
> 
> 
> Bugs: HIVE-10037
>     https://issues.apache.org/jira/browse/HIVE-10037
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
> Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
>   jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
>   jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
>   metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b9e15a1 
>   service/if/TCLIService.thrift 6f1a4ca 
>   service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
>   service/src/java/org/apache/hive/service/cli/Type.java 92d237d 
> 
> Diff: https://reviews.apache.org/r/32324/diff/
> 
> 
> Testing
> -------
> 
> Added test to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Jason Dere
> 
>


Re: Review Request 32324: HIVE-10037 JDBC support for interval expressions

Posted by Thejas Nair <th...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32324/#review78462
-----------------------------------------------------------



jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java
<https://reviews.apache.org/r/32324/#comment127213>

    can we re-use typeStringToHiveType here ?
    I see void and null as only things that need to be handled separately.


- Thejas Nair


On March 20, 2015, 11:48 p.m., Jason Dere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32324/
> -----------------------------------------------------------
> 
> (Updated March 20, 2015, 11:48 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Thejas Nair.
> 
> 
> Bugs: HIVE-10037
>     https://issues.apache.org/jira/browse/HIVE-10037
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
> Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().
> 
> 
> Diffs
> -----
> 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
>   jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
>   jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
>   jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
>   jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
>   metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b9e15a1 
>   service/if/TCLIService.thrift 6f1a4ca 
>   service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
>   service/src/java/org/apache/hive/service/cli/Type.java 92d237d 
> 
> Diff: https://reviews.apache.org/r/32324/diff/
> 
> 
> Testing
> -------
> 
> Added test to TestJdbcDriver2
> 
> 
> Thanks,
> 
> Jason Dere
> 
>


Re: Review Request 32324: HIVE-10037 JDBC support for interval expressions

Posted by Jason Dere <jd...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32324/
-----------------------------------------------------------

(Updated March 20, 2015, 11:48 p.m.)


Review request for hive, Ashutosh Chauhan and Thejas Nair.


Changes
-------

Removing generated thrift files from the diff for better readability


Bugs: HIVE-10037
    https://issues.apache.org/jira/browse/HIVE-10037


Repository: hive-git


Description
-------

There is no interval type in Jdbc, so year-month intervals and day-time intervals both use java.sql.Types.OTHER as the Jdbc type.
Also does some changes in JdbcColumn/HiveResultSetMetaData to allow a more accurate column precision/display size in the case of interval types, and to allow users to use get the HiveIntervalYearMonth/HiveIntervalDayTime values when calling ResultSet.getObject().


Diffs (updated)
-----

  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 2c85877 
  jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java cd1916f 
  jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java 764a3f1 
  jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java 3fcdd56 
  jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 4383f56 
  metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java 2758eb0 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java b9e15a1 
  service/if/TCLIService.thrift 6f1a4ca 
  service/src/java/org/apache/hive/service/cli/ColumnValue.java 9b48396 
  service/src/java/org/apache/hive/service/cli/Type.java 92d237d 

Diff: https://reviews.apache.org/r/32324/diff/


Testing
-------

Added test to TestJdbcDriver2


Thanks,

Jason Dere