Skip to content

Conversation

@gatorsmile
Copy link
Member

@gatorsmile gatorsmile commented Jun 12, 2016

What changes were proposed in this pull request?

CREATE TABLE table_with_partition(c1 string)
PARTITIONED by (p1 string,p2 string)

INSERT OVERWRITE TABLE table_with_partition
partition (p1='a',p2)
SELECT 'blarr3'

In the above example, we do not have enough input columns for dynamic partitioning. The first input column is already taken as data columns. This PR is to issue an exception in this scenario.

For your reference, below is the behavior of Hive:

hive> insert overwrite table t9 partition(p1='1',p2) select col from t1;
FAILED: SemanticException [Error 10044]: Line 1:23 Cannot insert into target table because column number/types are different 'p2': Table insclause-0 has 2 columns, but query has 1 columns.

How was this patch tested?

Added a test case and fixed an existing test case

@gatorsmile
Copy link
Member Author

There is a better fix in #12313. Let me close it.

@gatorsmile gatorsmile closed this Jun 12, 2016
@SparkQA
Copy link

SparkQA commented Jun 13, 2016

Test build #60373 has finished for PR 13628 at commit 4c49112.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants