GitHub user yhuai opened a pull request:

    https://github.com/apache/spark/pull/1118

    [SPARK-2177][SQL] describe table result contains only one column

    ```
    scala> hql("describe src").collect().foreach(println)
    
    [key                        string                  None                ]
    [value                      string                  None                ]
    ```
    
    The result should contain 3 columns instead of one. This screws up JDBC or 
even the downstream consumer of the Scala/Java/Python APIs.
    
    I am providing a workaround. We need a better way to handle the result of a 
native command in future.
    
    Also, if we upgrade Hive to 0.13, we need to check the results of 
context.sessionState.isHiveServerQuery() to determine how to split the result. 
This method is introduced by https://issues.apache.org/jira/browse/HIVE-4545. 
We may want to set Hive to use JsonMetaDataFormatter for the output of a DDL 
statement (`set hive.ddl.output.format=json`).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yhuai/spark SPARK-2177

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/1118.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1118
    
----
commit bb8bbef0dad2f79b57db1a9c810dbc918e01763c
Author: Yin Huai <[email protected]>
Date:   2014-06-18T19:09:43Z

    Split every string in the result of a describe command.

commit 725e88c1c7de5fb0b73ca4567686caa365f18de7
Author: Yin Huai <[email protected]>
Date:   2014-06-18T19:10:13Z

    Merge remote-tracking branch 'upstream/master' into SPARK-2177

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to