You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Thejas Nair <th...@hortonworks.com> on 2013/08/07 21:18:02 UTC

Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

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

Review request for hive.


Repository: hive-git


Description
-------

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.


Diffs
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 83f337b 
  jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java f35a351 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 4dcb260 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java a85a19d 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java 0d71891 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 0f48674 
  service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 7254491 

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


Testing
-------

Updated TestJdbcDriver2 unit tests


Thanks,

Thejas Nair


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

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



ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
<https://reviews.apache.org/r/13383/#comment62706>

    thats correct.
    


- Thejas Nair


On Jan. 31, 2014, 1:29 a.m., Thejas Nair wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13383/
> -----------------------------------------------------------
> 
> (Updated Jan. 31, 2014, 1:29 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-4545
>     https://issues.apache.org/jira/browse/HIVE-4545
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22bb22d 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 74fd53f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java a926f1e 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java 54b02cb 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java de788f7 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 9b0d482 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 445c858 
> 
> Diff: https://reviews.apache.org/r/13383/diff/
> 
> 
> Testing
> -------
> 
> Updated TestJdbcDriver2 unit tests
> 
> 
> Thanks,
> 
> Thejas Nair
> 
>


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

Posted by Gunther Hagleitner <gh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13383/#review33286
-----------------------------------------------------------



common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
<https://reviews.apache.org/r/13383/#comment62701>

    need to update default site file too



service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
<https://reviews.apache.org/r/13383/#comment62700>

    What keeps anyone from setting this after the session has been established? Is there a way to determine whether you're running in HS2 or CLI? (and use that when printing?)


- Gunther Hagleitner


On Jan. 31, 2014, 1:29 a.m., Thejas Nair wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13383/
> -----------------------------------------------------------
> 
> (Updated Jan. 31, 2014, 1:29 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-4545
>     https://issues.apache.org/jira/browse/HIVE-4545
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22bb22d 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 74fd53f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java a926f1e 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java 54b02cb 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java de788f7 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 9b0d482 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 445c858 
> 
> Diff: https://reviews.apache.org/r/13383/diff/
> 
> 
> Testing
> -------
> 
> Updated TestJdbcDriver2 unit tests
> 
> 
> Thanks,
> 
> Thejas Nair
> 
>


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

Posted by Vaibhav Gumashta <vg...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13383/#review33280
-----------------------------------------------------------



service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
<https://reviews.apache.org/r/13383/#comment62690>

    Do you think we should do this at HiveServer2 startup rather than at session level?


- Vaibhav Gumashta


On Jan. 31, 2014, 1:29 a.m., Thejas Nair wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13383/
> -----------------------------------------------------------
> 
> (Updated Jan. 31, 2014, 1:29 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-4545
>     https://issues.apache.org/jira/browse/HIVE-4545
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22bb22d 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 74fd53f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java a926f1e 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java 54b02cb 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java de788f7 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 9b0d482 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 445c858 
> 
> Diff: https://reviews.apache.org/r/13383/diff/
> 
> 
> Testing
> -------
> 
> Updated TestJdbcDriver2 unit tests
> 
> 
> Thanks,
> 
> Thejas Nair
> 
>


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

Posted by Mohammad Islam <mi...@yahoo.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13383/#review33284
-----------------------------------------------------------


Overall looks good.
added very simple comments.


ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
<https://reviews.apache.org/r/13383/#comment62697>

    Should we specify the default to 'true' here as well?
    I know it is done in HiveConf.java. Just to make sure.
    



ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
<https://reviews.apache.org/r/13383/#comment62696>

    So this is for only DESCRIBE TABLE. Doesn't have any meaning for other cases. right? In that case, rhe name of variable looks very generic for all cases. If it is only for MetaData level, can we use different name.



ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java
<https://reviews.apache.org/r/13383/#comment62698>

    No usage/meaning in this MDFormatter . right?
    


- Mohammad Islam


On Jan. 31, 2014, 1:29 a.m., Thejas Nair wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13383/
> -----------------------------------------------------------
> 
> (Updated Jan. 31, 2014, 1:29 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-4545
>     https://issues.apache.org/jira/browse/HIVE-4545
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22bb22d 
>   itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 74fd53f 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java a926f1e 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java 54b02cb 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java de788f7 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 9b0d482 
>   service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 445c858 
> 
> Diff: https://reviews.apache.org/r/13383/diff/
> 
> 
> Testing
> -------
> 
> Updated TestJdbcDriver2 unit tests
> 
> 
> Thanks,
> 
> Thejas Nair
> 
>


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

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

(Updated Jan. 31, 2014, 1:29 a.m.)


Review request for hive.


Changes
-------

rebased to trunk


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


Repository: hive-git


Description
-------

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.


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22bb22d 
  itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java 74fd53f 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java a926f1e 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java 54b02cb 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java de788f7 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 9b0d482 
  service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 445c858 

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


Testing
-------

Updated TestJdbcDriver2 unit tests


Thanks,

Thejas Nair


Re: Review Request 13383: HIVE-4545 - HS2 should return describe table results without space padding

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

(Updated Aug. 7, 2013, 7:18 p.m.)


Review request for hive.


Changes
-------

HIVE-4545.3.patch - updates test case to remove .trim() before comparison in two more places.


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


Repository: hive-git


Description
-------

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.


Diffs (updated)
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 83f337b 
  jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java f35a351 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 4dcb260 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/JsonMetaDataFormatter.java a85a19d 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatUtils.java 0d71891 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java 4c40034 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java 0f48674 
  service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java 7254491 

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


Testing
-------

Updated TestJdbcDriver2 unit tests


Thanks,

Thejas Nair