Uh oh!
There was an error while loading. Please reload this page.
[SPARK-2177][SQL] describe table result contains only one column - #1118
[SPARK-2177][SQL] describe table result contains only one column#1118yhuai wants to merge 15 commits into
Conversation
AmplabJenkins
commented
Jun 18, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 18, 2014
Merged build started. |
There was a problem hiding this comment.
actually for describe can we only split up to 3 columns?
scala>"a b c d e".split("\\s+", 3)
res2:Array[String] =Array(a, b, c d e)AmplabJenkins
commented
Jun 18, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 18, 2014
Merged build started. |
There was a problem hiding this comment.
Instead of introducing a special case here, can we put this piece of logic in a separate DescribeCommand? A while ago the introduction of SetCommand / ExplainCommand / CacheCommand serves partly to reduce special-casing in random places -- pinging @liancheng on this too.
There was a problem hiding this comment.
That sounds good. Let's merge this first and submit another PR for that. (Reason is this should make it into 1.0.1)
There was a problem hiding this comment.
Ah, my bad, when saying "just refer to NativeCommand", I actually meant to add a DescribeCommand following NativeCommand in hiveOperations.scala.
Actually, as briefly mentioned at the end of section PR Overview of PR #1071 description, we should specialize all native commands in the same way, and use NativeCommand as a default handler for those commands that haven't been specialized yet.
AmplabJenkins
commented
Jun 18, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
Jun 18, 2014
All automated tests passed. |
AmplabJenkins
commented
Jun 18, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 18, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15881/ |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
There was a problem hiding this comment.
Maybe for non metastore tables, we can just added some formatted/extended information saying they are registered as temporary tables? Then we can get rid of the extra lines here ...
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15898/ |
There was a problem hiding this comment.
api should go after MetaStoreUtils since api is a package
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. |
AmplabJenkins
commented
Jun 19, 2014
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15923/ |
AmplabJenkins
commented
Jun 19, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 19, 2014
Merged build started. |
AmplabJenkins
commented
Jun 19, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
Jun 19, 2014
All automated tests passed. |
yhuai
commented
Jun 20, 2014
For this PRD, if user want to describe a column, |
AmplabJenkins
commented
Jun 20, 2014
Merged build triggered. |
AmplabJenkins
commented
Jun 20, 2014
Merged build started. |
AmplabJenkins
commented
Jun 20, 2014
Merged build finished. All automated tests passed. |
AmplabJenkins
commented
Jun 20, 2014
All automated tests passed. |
rxin
commented
Jun 20, 2014
Ok I'm merging this in master & branch-1.0. Thanks! |
```
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 handle a subset of describe commands in Spark SQL, which are defined by ...
```
DESCRIBE [EXTENDED] [db_name.]table_name
```
All other cases are treated as Hive native commands.
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` introduced by https://issues.apache.org/jira/browse/HIVE-2822).
The link to JIRA: https://issues.apache.org/jira/browse/SPARK-2177
Author: Yin Huai <huai@cse.ohio-state.edu>
Closes#1118 from yhuai/SPARK-2177 and squashes the following commits:
fd2534c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177b9b9aa5 [Yin Huai] rxin's comments.
e7c4e72 [Yin Huai] Fix unit test.
656b068 [Yin Huai] 100 characters.
6387217 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-21778003cf3 [Yin Huai] Generate strings with the format like Hive for unit tests.
9787fff [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177440c5af [Yin Huai] rxin's comments.
f1a417e [Yin Huai] Update doc.
83adb2f [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177366f891 [Yin Huai] Add describe command.
74bd1d4 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177342fdf7 [Yin Huai] Split to up to 3 parts.
725e88c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177bb8bbef [Yin Huai] Split every string in the result of a describe command.
(cherry picked from commit f397e92)
Signed-off-by: Reynold Xin <rxin@apache.org>```
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 handle a subset of describe commands in Spark SQL, which are defined by ...
```
DESCRIBE [EXTENDED] [db_name.]table_name
```
All other cases are treated as Hive native commands.
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` introduced by https://issues.apache.org/jira/browse/HIVE-2822).
The link to JIRA: https://issues.apache.org/jira/browse/SPARK-2177
Author: Yin Huai <huai@cse.ohio-state.edu>
Closesapache#1118 from yhuai/SPARK-2177 and squashes the following commits:
fd2534c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
b9b9aa5 [Yin Huai] rxin's comments.
e7c4e72 [Yin Huai] Fix unit test.
656b068 [Yin Huai] 100 characters.
6387217 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
8003cf3 [Yin Huai] Generate strings with the format like Hive for unit tests.
9787fff [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
440c5af [Yin Huai] rxin's comments.
f1a417e [Yin Huai] Update doc.
83adb2f [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
366f891 [Yin Huai] Add describe command.
74bd1d4 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
342fdf7 [Yin Huai] Split to up to 3 parts.
725e88c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
bb8bbef [Yin Huai] Split every string in the result of a describe command.```
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 handle a subset of describe commands in Spark SQL, which are defined by ...
```
DESCRIBE [EXTENDED] [db_name.]table_name
```
All other cases are treated as Hive native commands.
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` introduced by https://issues.apache.org/jira/browse/HIVE-2822).
The link to JIRA: https://issues.apache.org/jira/browse/SPARK-2177
Author: Yin Huai <huai@cse.ohio-state.edu>
Closesapache#1118 from yhuai/SPARK-2177 and squashes the following commits:
fd2534c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
b9b9aa5 [Yin Huai] rxin's comments.
e7c4e72 [Yin Huai] Fix unit test.
656b068 [Yin Huai] 100 characters.
6387217 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
8003cf3 [Yin Huai] Generate strings with the format like Hive for unit tests.
9787fff [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
440c5af [Yin Huai] rxin's comments.
f1a417e [Yin Huai] Update doc.
83adb2f [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
366f891 [Yin Huai] Add describe command.
74bd1d4 [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
342fdf7 [Yin Huai] Split to up to 3 parts.
725e88c [Yin Huai] Merge remote-tracking branch 'upstream/master' into SPARK-2177
bb8bbef [Yin Huai] Split every string in the result of a describe command.…ets SSL errors from server (apache#1118) Co-authored-by: Egor Krivokon <>
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 handle a subset of describe commands in Spark SQL, which are defined by ...
All other cases are treated as Hive native commands.
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=jsonintroduced by https://issues.apache.org/jira/browse/HIVE-2822).The link to JIRA: https://issues.apache.org/jira/browse/SPARK-2177