-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37501][SQL] CREATE/REPLACE TABLE should qualify location for v2 command #34758
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
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #145766 has finished for PR 34758 at commit
|
c912456 to
e2ad849
Compare
|
@cloud-fan @imback82 @huaxingao Could you take a look? Thank you. |
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.
should we use a more generic method name and merge makeQualifiedNamespacePath and makeQualifiedTablePath to one
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.
Thank you for your advice. It would be better if merge them to one. How about makeQualifiedDBObjectPath?
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 makeQualifiedDBObjectPath is OK
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 we be consistent and always qualify the path in DataSourceV2Strategy?
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.
en. I do it.
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.
What's the real value?
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.
"file:" + WAREHOUSE_PATH + "/foo". eg:
file:/D:/code/bigdata/spark/spark-warehouse/org.apache.spark.sql.connector.DataSourceV2SQLSuite/foo
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.
then how about we check path.startsWith("file:") && path.endsWith("foo")?
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.
OK.
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
e2ad849 to
f24a69d
Compare
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.
shall we rename this and the one above to makeQualifiedDBObjectPath as well?
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.
ok.
f24a69d to
2da9ac2
Compare
| val propsWithOwner = CatalogV2Util.withDefaultOwnership(props) | ||
| val newProps = props.get(TableCatalog.PROP_LOCATION).map { loc => | ||
| props + (TableCatalog.PROP_LOCATION -> makeQualifiedDBObjectPath(loc)) | ||
| }.getOrElse(props) |
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.
As #PR not merged
|
Test build #145784 has finished for PR 34758 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Kubernetes integration test status failure |
|
Test build #145802 has finished for PR 34758 at commit
|
|
Test build #145804 has finished for PR 34758 at commit
|
|
thanks, merging to master! |
What changes were proposed in this pull request?
makeQualifiedNamespacePath->makeQualifiedLocationPathinCatalogUtils, so it not only for db/namespace, also for table.makeQualifiedLocationPathto take more types of parametersCreateTableExecadd handle thelocationproperties convert.Replace tablecommand.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.