Skip to content

Comments

[SPARK-38229][SQL] Should't check temp/external/ifNotExists with visitReplaceTable when parser#35541

Closed
yikf wants to merge 2 commits intoapache:masterfrom
yikf:SPARK-38229
Closed

[SPARK-38229][SQL] Should't check temp/external/ifNotExists with visitReplaceTable when parser#35541
yikf wants to merge 2 commits intoapache:masterfrom
yikf:SPARK-38229

Conversation

@yikf
Copy link
Contributor

@yikf yikf commented Feb 16, 2022

What changes were proposed in this pull request?

Spark does not support replace table syntax such as CREATE OR REPLACE TEMPORARY TABLE.../REPLACE EXTERNAL TABLE/REPLACE ... IF NOT EXISTS, And we don't need to check these tokens
image

Why are the changes needed?

code simplification

Does this PR introduce any user-facing change?

No

How was this patch tested?

Exist ut

@github-actions github-actions bot added the SQL label Feb 16, 2022
@yikf
Copy link
Contributor Author

yikf commented Feb 16, 2022

@cloud-fan Could you please take a look, thanks

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 0b17e87 Feb 17, 2022
*/
override def visitReplaceTableHeader(
ctx: ReplaceTableHeaderContext): TableHeader = withOrigin(ctx) {
ctx: ReplaceTableHeaderContext): Seq[String] = withOrigin(ctx) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we further clean it up? Now this method simply parses the table name, and we don't need to have a visitReplaceTableHeader method for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will file a follow-up for it later

cloud-fan pushed a commit that referenced this pull request Feb 24, 2022
…ification

### What changes were proposed in this pull request?

Clean up unnecessary code for code simplification, see [comment](#35541 (comment))

### Why are the changes needed?
code simplification

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Exist ut

Closes #35642 from Yikf/r.

Authored-by: Yikf <yikaifei1@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants