You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dpaani (via GitHub)" <gi...@apache.org> on 2023/03/28 15:14:24 UTC

[GitHub] [iceberg] dpaani opened a new issue, #7227: Drop the SQL issue when attempting to drop an Iceberg table whose location does not exist

dpaani opened a new issue, #7227:
URL: https://github.com/apache/iceberg/issues/7227

   ### Apache Iceberg version
   
   1.2.0 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   When executing a DROP SQL on an Iceberg table where the table location does not exist, it throws the following exception:
   
   ```
   Location does not exist: s3a://<bucket>/<key-path>/metadata/00001-06c101d1-ef87-4c55-bfe3-8bf4332cff26.metadata.json
   org.apache.iceberg.exceptions.NotFoundException: Location does not exist: s3a://<bucket>/<key-path>/metadata/00001-06c101d1-ef87-4c55-bfe3-8bf4332cff26.metadata.json
   	at org.apache.iceberg.aws.s3.S3InputStream.openStream(S3InputStream.java:193)
   	at org.apache.iceberg.aws.s3.S3InputStream.positionStream(S3InputStream.java:176)
   	at org.apache.iceberg.aws.s3.S3InputStream.read(S3InputStream.java:106)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.ensureLoaded(ByteSourceJsonBootstrapper.java:539)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.detectEncoding(ByteSourceJsonBootstrapper.java:133)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.core.json.ByteSourceJsonBootstrapper.constructParser(ByteSourceJsonBootstrapper.java:256)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.core.JsonFactory._createParser(JsonFactory.java:1655)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:1083)
   	at org.apache.iceberg.shaded.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3666)
   	at org.apache.iceberg.TableMetadataParser.read(TableMetadataParser.java:267)
   	at org.apache.iceberg.TableMetadataParser.read(TableMetadataParser.java:260)
   	at org.apache.iceberg.BaseMetastoreTableOperations.lambda$refreshFromMetadataLocation$0(BaseMetastoreTableOperations.java:186)
   	at org.apache.iceberg.BaseMetastoreTableOperations.lambda$refreshFromMetadataLocation$1(BaseMetastoreTableOperations.java:205)
   	at org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:402)
   	at org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:212)
   	at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:196)
   	at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:189)
   	at org.apache.iceberg.BaseMetastoreTableOperations.refreshFromMetadataLocation(BaseMetastoreTableOperations.java:205)
   	at org.apache.iceberg.BaseMetastoreTableOperations.refreshFromMetadataLocation(BaseMetastoreTableOperations.java:182)
   	at org.apache.iceberg.BaseMetastoreTableOperations.refreshFromMetadataLocation(BaseMetastoreTableOperations.java:177)
   	at org.apache.iceberg.hive.HiveTableOperations.doRefresh(HiveTableOperations.java:251)
   	at org.apache.iceberg.BaseMetastoreTableOperations.refresh(BaseMetastoreTableOperations.java:100)
   	at org.apache.iceberg.BaseMetastoreTableOperations.current(BaseMetastoreTableOperations.java:83)
   	at org.apache.iceberg.BaseMetastoreCatalog.loadTable(BaseMetastoreCatalog.java:44)
   	at org.apache.iceberg.spark.SparkCatalog.load(SparkCatalog.java:819)
   	at org.apache.iceberg.spark.SparkCatalog.loadTable(SparkCatalog.java:159)
   	at org.apache.iceberg.spark.SparkSessionCatalog.loadTable(SparkSessionCatalog.java:138)
   	at org.apache.spark.sql.connector.catalog.CatalogV2Util$.loadTable(CatalogV2Util.scala:311)
   
   ```
   
    In this case, the Iceberg table still exists in the metastore, and we need a way to drop it from the metastore.
   
   It is possible to do this without configuring spark_catalog with SparkSessionCatalog or SparkCatalog. However, it is still required even if the spark catalog is configured.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] Drop the SQL issue when attempting to drop an Iceberg table whose location does not exist [iceberg]

Posted by "maxfirman (via GitHub)" <gi...@apache.org>.
maxfirman commented on issue #7227:
URL: https://github.com/apache/iceberg/issues/7227#issuecomment-1750323978

   I've just hit this issue. I see there are two open PRs to resolve this: #7228 and #6786. My two cents is that modifying the behaviour of `DROP TABLE` to succeed even if the metadata is missing is the right fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [I] Drop the SQL issue when attempting to drop an Iceberg table whose location does not exist [iceberg]

Posted by "HanzhiWang1105 (via GitHub)" <gi...@apache.org>.
HanzhiWang1105 commented on issue #7227:
URL: https://github.com/apache/iceberg/issues/7227#issuecomment-1942809558

   Hi all,
   I hit same issue. Any idea how to get the workaround and drop the table before the fixed PR is released? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [iceberg] github-actions[bot] commented on issue #7227: Drop the SQL issue when attempting to drop an Iceberg table whose location does not exist

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7227:
URL: https://github.com/apache/iceberg/issues/7227#issuecomment-1732710672

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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