Skip to content

Conversation

@Peng-Lei
Copy link
Contributor

What changes were proposed in this pull request?

  1. Rename method name makeQualifiedNamespacePath -> makeQualifiedLocationPath in CatalogUtils, so it not only for db/namespace, also for table.
  2. Override the method makeQualifiedLocationPath to take more types of parameters
  3. In CreateTableExec add handle the location properties convert.
  4. Add handle for Replace table command.

Why are the changes needed?

keep consistent for v1 and v2, and disscuss at #comments

Does this PR introduce any user-facing change?

No

How was this patch tested?

existed test case.

@SparkQA
Copy link

SparkQA commented Nov 30, 2021

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

@SparkQA
Copy link

SparkQA commented Nov 30, 2021

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

@SparkQA
Copy link

SparkQA commented Nov 30, 2021

Test build #145766 has finished for PR 34758 at commit c912456.

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

@Peng-Lei
Copy link
Contributor Author

Peng-Lei commented Dec 1, 2021

@cloud-fan @imback82 @huaxingao Could you take a look? Thank you.

Copy link
Contributor

@LuciferYang LuciferYang Dec 1, 2021

Choose a reason for hiding this comment

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

should we use a more generic method name and merge makeQualifiedNamespacePath and makeQualifiedTablePath to one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your advice. It would be better if merge them to one. How about makeQualifiedDBObjectPath?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think makeQualifiedDBObjectPath is OK

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 be consistent and always qualify the path in DataSourceV2Strategy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

en. I do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the real value?

Copy link
Contributor Author

@Peng-Lei Peng-Lei Dec 1, 2021

Choose a reason for hiding this comment

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

"file:" + WAREHOUSE_PATH + "/foo". eg:
file:/D:/code/bigdata/spark/spark-warehouse/org.apache.spark.sql.connector.DataSourceV2SQLSuite/foo

Copy link
Contributor

Choose a reason for hiding this comment

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

then how about we check path.startsWith("file:") && path.endsWith("foo")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK.

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

Copy link
Contributor

Choose a reason for hiding this comment

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

shall we rename this and the one above to makeQualifiedDBObjectPath as well?

Copy link
Contributor Author

@Peng-Lei Peng-Lei Dec 1, 2021

Choose a reason for hiding this comment

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

ok.

val propsWithOwner = CatalogV2Util.withDefaultOwnership(props)
val newProps = props.get(TableCatalog.PROP_LOCATION).map { loc =>
props + (TableCatalog.PROP_LOCATION -> makeQualifiedDBObjectPath(loc))
}.getOrElse(props)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As #PR not merged

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

Test build #145784 has finished for PR 34758 at commit e2ad849.

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

Test build #145802 has finished for PR 34758 at commit f24a69d.

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

@SparkQA
Copy link

SparkQA commented Dec 1, 2021

Test build #145804 has finished for PR 34758 at commit 2da9ac2.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 38115cb Dec 1, 2021
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.

4 participants