[ 
https://issues.apache.org/jira/browse/HIVE-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Phabricator updated HIVE-2822:
------------------------------

    Attachment: HIVE-2822.D2475.1.patch

ctdean requested code review of "HIVE-2822 [jira] Add JSON output to the hive 
ddl commands".
Reviewers: JIRA

  JSON output for DDL commands

  By setting the variable hive.format=json then ddl commands will
  produce json output suitable for client side parsing.  For example, to
  list all the databases one might get:

      {
        "databases": [
          "default"
        ]
      }

  The goal is to have an option to produce JSON output of the DDL commands that 
is easily machine parseable.

  For example, "desc my_table" currently gives

      id    bigint
      user  string

  and we want to allow a json output:

      {
        "columns": [
          {"name": "id", "type": "bigint"},
          {"name": "user", "type": "string"}
        ]
      }

TEST PLAN
  Run the provided unit tests

REVISION DETAIL
  https://reviews.facebook.net/D2475

AFFECTED FILES
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
  ql/src/java/org/apache/hadoop/hive/ql/metadata/JsonMetaDataFormatter.java
  ql/src/java/org/apache/hadoop/hive/ql/metadata/MapBuilder.java
  ql/src/java/org/apache/hadoop/hive/ql/metadata/MetaDataFormatter.java
  ql/src/java/org/apache/hadoop/hive/ql/metadata/TextMetaDataFormatter.java
  ql/src/test/queries/clientpositive/describe_database_json.q
  ql/src/test/queries/clientpositive/describe_table_json.q
  ql/src/test/queries/clientpositive/misc_json.q
  ql/src/test/queries/clientpositive/partitions_json.q
  ql/src/test/results/clientpositive/describe_database_json.q.out
  ql/src/test/results/clientpositive/describe_table_json.q.out
  ql/src/test/results/clientpositive/misc_json.q.out
  ql/src/test/results/clientpositive/partitions_json.q.out

MANAGE HERALD DIFFERENTIAL RULES
  https://reviews.facebook.net/herald/view/differential/

WHY DID I GET THIS EMAIL?
  https://reviews.facebook.net/herald/transcript/5553/

Tip: use the X-Herald-Rules header to filter Herald messages in your client.

                
> Add JSON output to the hive ddl commands
> ----------------------------------------
>
>                 Key: HIVE-2822
>                 URL: https://issues.apache.org/jira/browse/HIVE-2822
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Chris Dean
>         Attachments: HIVE-2822.03-branch0-8.patch, HIVE-2822.03.patch, 
> HIVE-2822.03b.patch, HIVE-2822.04-branch-08.patch, 
> HIVE-2822.05-branch0-8-1.patch, HIVE-2822.05-branch0-8.patch, 
> HIVE-2822.05.patch, HIVE-2822.D2475.1.patch, hive-json-01-branch0-8.patch, 
> hive-json-01.patch, hive-json-02-branch0-8.patch, hive-json-02.patch
>
>
> The goal is to have an option to produce JSON output of the DDL commands that 
> is easily machine parseable.
> For example, "desc my_table" currently gives
> {noformat}
>     id    bigint
>     user  string
> {noformat} 
> and we want to allow a json output:
> {noformat}
>     {
>       "columns": [
>         {"name": "id", "type": "bigint"},
>         {"name": "user", "type": "string"}
>       ]
>     }
> {noformat} 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to