You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/02/17 08:28:00 UTC

[jira] [Commented] (SPARK-38236) Absolute file paths specified in create/alter table are treated as relative

    [ https://issues.apache.org/jira/browse/SPARK-38236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493763#comment-17493763 ] 

Apache Spark commented on SPARK-38236:
--------------------------------------

User 'bozhang2820' has created a pull request for this issue:
https://github.com/apache/spark/pull/35462

> Absolute file paths specified in create/alter table are treated as relative
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-38236
>                 URL: https://issues.apache.org/jira/browse/SPARK-38236
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.1.1, 3.1.2, 3.2.0, 3.2.1
>            Reporter: Bo Zhang
>            Priority: Major
>
> After https://github.com/apache/spark/pull/28527 we change to create table under the database location when the table location specified is relative. However the criteria to determine if a table location is relative/absolute is URI.isAbsolute, which basically checks if the table location URI has a scheme defined. So table URIs like /table/path are treated as relative and the scheme and authority of the database location URI are used to create the table. For example, when the database location URI is s3a://bucket/db, the table will be created at s3a://bucket/table/path, while it should be created under the file system defined in SessionCatalog.hadoopConf instead.
> This also applies to alter table.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org