Review Board 1.7.22


HIVE-4545 - HS2 should return describe table results without space padding

Review Request #13383 - Created Aug. 7, 2013 and updated

Thejas Nair
HIVE-4545
Reviewers
hive
hive-git
HIVE-3140 changed behavior of 'DESCRIBE table;' to be like 'DESCRIBE FORMATTED table;'. HIVE-3140 introduced changes to not print header in 'DESCRIBE table;'. But jdbc/odbc calls still get fields padded with space for the 'DESCRIBE table;' query.

As the jdbc/odbc results are not for direct human consumption the space padding should not be done for hive server2.
Updated TestJdbcDriver2 unit tests
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision 22bb22d New Change
[20] 767 lines
[+20] [+] public class HiveConf extends Configuration {
768
    // beginning and end of Driver.run, these will be run in the order specified
768
    // beginning and end of Driver.run, these will be run in the order specified
769
    HIVE_DRIVER_RUN_HOOKS("hive.exec.driver.run.hooks", ""),
769
    HIVE_DRIVER_RUN_HOOKS("hive.exec.driver.run.hooks", ""),
770
    HIVE_DDL_OUTPUT_FORMAT("hive.ddl.output.format", null),
770
    HIVE_DDL_OUTPUT_FORMAT("hive.ddl.output.format", null),
771
    HIVE_ENTITY_SEPARATOR("hive.entity.separator", "@"),
771
    HIVE_ENTITY_SEPARATOR("hive.entity.separator", "@"),
772

    
   
772

   

    
   
773
    //Whether to do space padding, indentation for human readability

    
   
774
    //controls 'describe table' and 'show columns' output. But formatting

    
   
775
    // keywords in query can override this.

    
   
776
    //Automatically set by hive-server2

    
   
777
    HIVE_HUMAN_FRIENDLY_FORMAT("hive.human.friendly.format", true),

    
   
778

   
773
    HIVE_SERVER2_MAX_START_ATTEMPTS("hive.server2.max.start.attempts", 30L,
779
    HIVE_SERVER2_MAX_START_ATTEMPTS("hive.server2.max.start.attempts", 30L,
774
        new LongRangeValidator(0L, Long.MAX_VALUE)),
780
        new LongRangeValidator(0L, Long.MAX_VALUE)),
775

    
   
781

   
776
    // binary or http
782
    // binary or http
777
    HIVE_SERVER2_TRANSPORT_MODE("hive.server2.transport.mode", "binary",
783
    HIVE_SERVER2_TRANSPORT_MODE("hive.server2.transport.mode", "binary",
[+20] [20] 731 lines
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java
Revision 74fd53f New Change
 
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
Revision a926f1e New Change
 
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
Revision 54b02cb New Change
 
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java
Revision de788f7 New Change
 
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java
Revision 4c40034 New Change
 
ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
Revision 9b0d482 New Change
 
service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
Revision 445c858 New Change
 
  1. common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java: Loading...
  3. ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java: Loading...
  4. ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java: Loading...
  5. ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java: Loading...
  6. ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java: Loading...
  7. ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java: Loading...
  8. service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java: Loading...