Skip to content

[SPARK-36902][SQL] Migrate CreateTableAsSelectStatement to v2 command - #34667

Closed
dchvn wants to merge 9 commits into
apache:masterfrom
dchvn:migrate-CTAS
Closed

[SPARK-36902][SQL] Migrate CreateTableAsSelectStatement to v2 command#34667
dchvn wants to merge 9 commits into
apache:masterfrom
dchvn:migrate-CTAS

Conversation

@dchvn

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Migrate CreateTableAsSelectStatement to v2 command

Why are the changes needed?

Migrate CreateTableAsSelectStatement to v2 command

Does this PR introduce any user-facing change?

No

How was this patch tested?

existing tests

@dchvn

Copy link
Copy Markdown
ContributorAuthor

CC @huaxingao FYI, Please take a look when you find some time, thanks!

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49922/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49922/

@SparkQA

Copy link
Copy Markdown

Test build #145451 has finished for PR 34667 at commit 145f22b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • trait V2CreateTablePlanX extends LogicalPlan

@dchvndchvn changed the title [WIP][SPARK-36902][SQL] Migrate CreateTableAsSelectStatement to v2 command[SPARK-36902][SQL] Migrate CreateTableAsSelectStatement to v2 commandNov 30, 2021
@dchvn
dchvn marked this pull request as ready for review November 30, 2021 10:53
@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50239/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50239/

@SparkQA

Copy link
Copy Markdown

Test build #145767 has finished for PR 34667 at commit b5c2787.

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

@dchvn

dchvn commented Dec 1, 2021

Copy link
Copy Markdown
ContributorAuthor

CC @huaxingao@cloud-fan FYI, thanks!

Comment threadsql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala Outdated
Comment threadsql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala Outdated
Comment threadsql/core/src/main/scala/org/apache/spark/sql/DataFrameWriterV2.scala Outdated
@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50312/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50312/

@SparkQA

Copy link
Copy Markdown

Test build #145837 has finished for PR 34667 at commit 729cc22.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50351/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50351/


val tableSpec = TableSpec(
bucketSpec = None,
properties = Map(TableCatalog.PROP_PROVIDER -> source) ++ location,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should not include the location property. We already specify it in TableSpec.location

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actually, we should put Map.empty here. provide is also specified in TableSpec.provider

@SparkQA

Copy link
Copy Markdown

Test build #145876 has finished for PR 34667 at commit cba6519.

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

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50364/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50364/

@SparkQA

Copy link
Copy Markdown

Test build #145890 has finished for PR 34667 at commit 5186f81.

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

@cloud-fan

Copy link
Copy Markdown
Contributor

thanks, merging to master!

@dchvn

dchvn commented Dec 3, 2021

Copy link
Copy Markdown
ContributorAuthor

thanks!

@dchvn
dchvn deleted the migrate-CTAS branch December 3, 2021 14:36
@dongjoon-hyun

Copy link
Copy Markdown
Member

Hi, @dchvn and @cloud-fan .
Could you check if this breaks Java doc?

[error] sbt.inc.Doc$JavadocGenerationFailed

Some(source),
df.queryExecution.analyzed,
tableSpec,
Map.empty,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@huaxingao can you fix this similar bug as well when you open the PR?

cloud-fan pushed a commit that referenced this pull request Dec 27, 2021
…write options in CTAS and RTAS
### What changes were proposed in this pull request?
`DataFrameWriter.saveAsTable` should pass `extraOptions.toMap` as the write options in CTAS and RTAS
### Why are the changes needed?
bug fixing
please see #34754 (comment)#34667 (comment)
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
new test
Closes#34997 from huaxingao/write_option.
Authored-by: Huaxin Gao <huaxin_gao@apple.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for freeto 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.

4 participants

@dchvn@SparkQA@cloud-fan@dongjoon-hyun