Uh oh!
There was an error while loading. Please reload this page.
[SPARK-7626][SQL] Consider the columns in Hive table but not in partition when filling values - #6146
[SPARK-7626][SQL] Consider the columns in Hive table but not in partition when filling values#6146viirya wants to merge 3 commits into
Conversation
SparkQA
commented
May 14, 2015
Test build #32707 has finished for PR 6146 at commit
|
marmbrus
commented
Jun 17, 2015
Please explain your change. Neither the JIRA nor the PR description describe why you the original code is incorrect. |
There was a problem hiding this comment.
When a non-partition key attribution doesn't exist in the partition's (determined by the partition's StructObjectInspector), we should produce a null ref. Previously, we don't check it and directly call getStructFieldRef to query the field ref. It will cause the error reported in the JIRA.
Conflicts: sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala
SparkQA
commented
Jun 19, 2015
Test build #35281 has finished for PR 6146 at commit
|
SparkQA
commented
Jun 19, 2015
Test build #35292 has finished for PR 6146 at commit
|
marmbrus
commented
Jun 19, 2015
What about a test case? |
viirya
commented
Jun 20, 2015
@marmbrus Although the code looks problematic, I mentioned on the JIRA that I can't reproduce the problem. By more testing and searching codes, I found that in your PR #5876 (https://github.com/apache/spark/pull/5876/files#diff-ee66e11b56c21364760a5ed2b783f863R620) you modified how to produce hive partition objects where you populate partition's schema from table schema. So any newly added columns in hive table will appear in its partitions' schema too. That is why I can't produce this problem. Thus, all non-partition key attributions will always exist in table partitions. And this reported bug is solved by the PR #5876. Because of that, I think I can close this PR now. |
marmbrus
commented
Jun 22, 2015
Thanks for following up! |
JIRA: https://issues.apache.org/jira/browse/SPARK-7626