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

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

Bo Zhang created SPARK-38236:
--------------------------------

             Summary: 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.2.1, 3.2.0, 3.1.2, 3.1.1
            Reporter: Bo Zhang


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