----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/15666/#review29252 -----------------------------------------------------------
service/src/java/org/apache/hive/service/cli/TypeDescriptor.java <https://reviews.apache.org/r/15666/#comment56400> JdbcColumn was returning 29 for timestamp precision (for ResultSetMetadata), this value (used for DatabaseMetaData.getColumns()) was returning 30. Just trying to make them consistent. service/src/java/org/apache/hive/service/cli/TypeDescriptor.java <https://reviews.apache.org/r/15666/#comment56403> JdbcColumn was returning 29 for timestamp precision (for ResultSetMetadata), and this value (used for DatabaseMetaData.getColumns()) was returning 30. Just trying to make them consistent. I believe that 29 should be correct: 'yyyy-mm-dd hh:mm:ss.nnnnnnnnn' service/src/java/org/apache/hive/service/cli/TypeDescriptor.java <https://reviews.apache.org/r/15666/#comment56407> Again, just trying to make some consistency between ResultSetMetaData and getColumns(). JdbcColumn.getScale() was showing 9 here, I think because timestamp can have a nanoseconds component. Previously getColumns() would have been returning null here. service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java <https://reviews.apache.org/r/15666/#comment56408> From the Jdbc docs: "The COLUMN_SIZE column specifies the column size for the given column. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation" - Jason Dere On Nov. 19, 2013, 3:28 a.m., Jason Dere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/15666/ > ----------------------------------------------------------- > > (Updated Nov. 19, 2013, 3:28 a.m.) > > > Review request for hive and Thejas Nair. > > > Bugs: HIVE-5847 > https://issues.apache.org/jira/browse/HIVE-5847 > > > Repository: hive-git > > > Description > ------- > > - getColumns(): column_size, decimal_digits, num_prec_radix should use the > proper type info for char/varchar/decimal > - getColumns(): column_size set to 29 for timestamp, to match JDBC > ResultSetMetadata > - getColumns() and ResultSetMetadata should return same scale for timestamp > (9). > - Changed radix to 10 for all numeric types; was previously set to 2 for > float/double > > > Diffs > ----- > > itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java > 7b1c9da > jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java 42ec32a > service/src/java/org/apache/hive/service/cli/Type.java 9329392 > service/src/java/org/apache/hive/service/cli/TypeDescriptor.java fb0236c > > service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java > af87a90 > > service/src/java/org/apache/hive/service/cli/operation/GetTypeInfoOperation.java > 2daa9cd > > Diff: https://reviews.apache.org/r/15666/diff/ > > > Testing > ------- > > > Thanks, > > Jason Dere > >