Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-37546][SQL] V2 ReplaceTableAsSelect command should qualify loc…
…ation ### What changes were proposed in this pull request? Currently, v2 RTAS command doesn't qualify the location: ``` spark.sql("REPLACE TABLE testcat.t USING foo LOCATION '/tmp/foo' AS SELECT id FROM source") spark.sql("DESCRIBE EXTENDED testcat.t").filter("col_name = 'Location'").show +--------+-------------+-------+ |col_name| data_type|comment| +--------+-------------+-------+ |Location|/tmp/foo | | +--------+-------------+-------+ ``` , whereas v1 command qualifies the location as file:/tmp/foo which is the correct behavior since the default filesystem can change for different sessions. ### Why are the changes needed? This PR proposes to store the qualified location in order to prevent the issue where default filesystem changes for different sessions. ### Does this PR introduce _any_ user-facing change? Yes, now, v2 RTAS command will store qualified location: ``` +--------+-------------+-------+ |col_name| data_type|comment| +--------+-------------+-------+ |Location|file:/tmp/foo| | +--------+-------------+-------+ ``` ### How was this patch tested? new test Closes #34807 from huaxingao/location. Authored-by: Huaxin Gao <huaxin_gao@apple.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information
Showing
2 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters