-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-3907][sql] add truncate table support #2770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Can one of the admins verify this patch? |
1 similar comment
|
Can one of the admins verify this patch? |
|
Jenkins, test this please. |
|
QA tests have started for PR 2770 at commit
|
|
QA tests have finished for PR 2770 at commit
|
|
Test FAILed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“tabel” is a typo. I think it's better not to include this part here, which would make the code not very clean. You can remove this part and fix truncate column in another PR, or fix that in this PR.
|
QA tests have started for PR 2770 at commit
|
|
QA tests have finished for PR 2770 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is truncate table a no-explain-command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adrian-wang I think explain for truncate table is meaningless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add that in nativeCommands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If add truncate table in nativeCommands,the sql truncate table test columns(i) will run hive mapreduce.At present, the columns way only support rcfile in hive.so ,we must put truncate table in nodeToPlan,and truncate table name columns(i)return anomalies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment below explaining this?
|
QA tests have started for PR 2770 at commit
|
|
QA tests have finished for PR 2770 at commit
|
|
test this please |
|
QA tests have started for PR 2770 at commit
|
|
QA tests have finished for PR 2770 at commit
|
|
Test FAILed. |
|
retest this please |
|
QA tests have started for PR 2770 at commit
|
|
QA tests have finished for PR 2770 at commit
|
|
Test PASSed. |
|
Test build #442 has started for PR 2770 at commit
|
|
Test build #442 has finished for PR 2770 at commit
|
|
Test build #468 has started for PR 2770 at commit
|
|
Test build #468 has finished for PR 2770 at commit
|
|
Test build #470 has started for PR 2770 at commit
|
|
Test build #470 has finished for PR 2770 at commit
|
|
It appears there are some style violations: |
|
ok to test |
|
Can you please make the title SPARK-XXXX so that the merge script recognizes the JIRA? |
|
Test build #22331 has started for PR 2770 at commit
|
|
Test build #22331 has finished for PR 2770 at commit
|
|
Test PASSed. |
|
Thanks! Merged to master. |
|
@wangxiaojing @tianyi @marmbrus If I just use the default database It will throw exception It's a bug when parsing the |
|
@OopsOutOfMemory please file a JIRA. |
|
@OopsOutOfMemory Thanks a lot! |
|
Yep, that is what I guess yesterday. |
JIRA issue: [SPARK-3907]https://issues.apache.org/jira/browse/SPARK-3907
Add turncate table support
TRUNCATE TABLE table_name [PARTITION partition_spec];
partition_spec:
: (partition_col = partition_col_value, partition_col = partiton_col_value, ...)
Removes all rows from a table or partition(s). Currently target table should be native/managed table or exception will be thrown. User can specify partial partition_spec for truncating multiple partitions at once and omitting partition_spec will truncate all partitions in the table.