Activity

I am interested to work on this just i am conforming the requirement...

If INSERT OVERWRITE TABLE X PARTITION (a=b, c=d)... earlier it is working like
If partition not exists it will create the partition and add data into it.
If partition exists it will delete the old data and it will add new data.

After change INSERT OVERWRITE TABLE X PARTITION (a=b, c=d) IF NOT EXISTS ...
If partition not exists it will create the partition and add data into it.
If partition exists it wont do any thing (it wont delete old data and wont add new data)
and this should happen at the time of query compilation like
"create table if not exists as select"

Chinna Rao Lalam
added a comment - 23/Nov/11 14:32 I am interested to work on this just i am conforming the requirement...
If INSERT OVERWRITE TABLE X PARTITION (a=b, c=d)... earlier it is working like
If partition not exists it will create the partition and add data into it.
If partition exists it will delete the old data and it will add new data.
After change INSERT OVERWRITE TABLE X PARTITION (a=b, c=d) IF NOT EXISTS ...
If partition not exists it will create the partition and add data into it.
If partition exists it wont do any thing (it wont delete old data and wont add new data)
and this should happen at the time of query compilation like
"create table if not exists as select"

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:https://reviews.apache.org/r/2974/
-----------------------------------------------------------

Review request for hive and namit jain.

Summary
-------

INSERT OVERWRITE TABLE X PARTITION (a=b, c=d) IF NOT EXISTS ...
The partition should be created and written if and only if it's not there already.
Added a check to validate the partition exist or not.

Phabricator
added a comment - 02/Dec/11 07:05 njain requested code review of " HIVE-2602 [jira] add support for insert partition overwrite(...) if not exists".
Reviewers: JIRA
HIVE-2602
INSERT OVERWRITE TABLE X PARTITION (a=b, c=d) IF NOT EXISTS ...
The partition should be created and written if and only if it's not there already.
The support can be added for dynamic partitions in the future, but this jira is for adding this support for static partitions.
TEST PLAN
EMPTY
REVISION DETAIL
https://reviews.facebook.net/D579
AFFECTED FILES
ql/src/test/results/clientpositive/insert1_overwrite_partitions.q.out
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q
ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
MANAGE HERALD DIFFERENTIAL RULES
https://reviews.facebook.net/herald/view/differential/
WHY DID I GET THIS EMAIL?
https://reviews.facebook.net/herald/transcript/1281/
Tip: use the X-Herald-Rules header to filter Herald messages in your client.

njain has commented on the revision "HIVE-2602[jira] add support for insert partition overwrite(...) if not exists".

INLINE COMMENTS
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:890 fix the spelling of existls
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:1 add a explain plan for the insert overtwrite statements.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:892 Instead of adding a new variable 'skipAnalysis'- add a return value to doPhase1 - continue or get out remaining processing.
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:3 Add a test for insert overwrite if not exists for dynamic partitions
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:6 For a small output, can you load only 5 rows from kv1.txt

Phabricator
added a comment - 08/Dec/11 17:53 njain has commented on the revision " HIVE-2602 [jira] add support for insert partition overwrite(...) if not exists".
INLINE COMMENTS
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:890 fix the spelling of existls
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:1 add a explain plan for the insert overtwrite statements.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:892 Instead of adding a new variable 'skipAnalysis'- add a return value to doPhase1 - continue or get out remaining processing.
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:3 Add a test for insert overwrite if not exists for dynamic partitions
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q:6 For a small output, can you load only 5 rows from kv1.txt
REVISION DETAIL
https://reviews.facebook.net/D579

Phabricator
added a comment - 15/Dec/11 05:11 njain requested code review of " HIVE-2602 [jira] add support for insert partition overwrite(...) if not exists".
Reviewers: JIRA
HIVE-2602
INSERT OVERWRITE TABLE X PARTITION (a=b, c=d) IF NOT EXISTS ...
The partition should be created and written if and only if it's not there already.
The support can be added for dynamic partitions in the future, but this jira is for adding this support for static partitions.
TEST PLAN
EMPTY
REVISION DETAIL
https://reviews.facebook.net/D879
AFFECTED FILES
ql/src/test/results/clientpositive/insertover_dynapart_ifnotexists.q.out
ql/src/test/results/clientpositive/insert1_overwrite_partitions.q.out
ql/src/test/queries/clientpositive/insertover_dynapart_ifnotexists.q
ql/src/test/queries/clientpositive/insert1_overwrite_partitions.q
ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
MANAGE HERALD DIFFERENTIAL RULES
https://reviews.facebook.net/herald/view/differential/
WHY DID I GET THIS EMAIL?
https://reviews.facebook.net/herald/transcript/1863/
Tip: use the X-Herald-Rules header to filter Herald messages in your client.

1. make the tests deterministic. Add a order by when you are selecting 5 rows (limit 5)
2. Throw a semantic error for 'if not exists' for dynamic partitions - it might be confusing to document this
behavior for dynamic partitions, so let us now allow it.

Namit Jain
added a comment - 15/Dec/11 05:52 1. make the tests deterministic. Add a order by when you are selecting 5 rows (limit 5)
2. Throw a semantic error for 'if not exists' for dynamic partitions - it might be confusing to document this
behavior for dynamic partitions, so let us now allow it.