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

[jira] [Resolved] (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:all-tabpanel ]

Wenchen Fan resolved SPARK-38236.
---------------------------------
    Fix Version/s: 3.2.2
                   3.1.3
       Resolution: Fixed

Issue resolved by pull request 35591
[https://github.com/apache/spark/pull/35591]

> 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
>            Assignee: Bo Zhang
>            Priority: Major
>             Fix For: 3.2.2, 3.1.3
>
>
> 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