andersonad opened a new issue #3838:
URL: https://github.com/apache/iceberg/issues/3838


   Testing the changes to the spark-sql extension procedures, it seems that the 
`remove_orphan_files` stored procedure is not working with S3FileIO, failing 
with `Caused by: org.apache.hadoop.fs.UnsupportedFileSystemException: No 
FileSystem for scheme "s3"`
   
   Note that this error is **not** encountered with `rewrite_manifests`, 
`rewrite_data_files`, or `expire_snapshots`.
   
   To reproduce in pyspark v3.2:
   
   ```
   spark_packages = [
       'software.amazon.awssdk:bundle:2.16.43',
       'software.amazon.awssdk:url-connection-client:2.16.43',
   ]
   
   catalog_name = 'iceberg_dev'
   sub_name = 'testtable'
   table_name = f"{catalog_name}.{sub_name}"
   
   spark = SparkSession \
       .builder \
       .config('spark.jars.packages', ','.join(spark_packages)) \
       .config('spark.jars', 
'~/iceberg/spark/v3.2/spark-runtime/build/libs/iceberg-spark-runtime-3.2_2.12-0.13.0-SNAPSHOT.jar')
 \
       .config('spark.sql.extensions', 
'org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions') \
       .config(f'spark.sql.catalog.{catalog_name}', 
'org.apache.iceberg.spark.SparkCatalog') \
       .config(f'spark.sql.catalog.{catalog_name}.warehouse', 
f's3://{catalog_name}') \
       .config(f'spark.sql.catalog.{catalog_name}.catalog-impl', 
'org.apache.iceberg.aws.glue.GlueCatalog') \
       .config(f'spark.sql.catalog.{catalog_name}.io-impl', 
'org.apache.iceberg.aws.s3.S3FileIO') \
       .config(f'spark.sql.catalog.{catalog_name}.lock-impl', 
'org.apache.iceberg.aws.glue.DynamoLockManager') \
       .config(f'spark.sql.catalog.{catalog_name}.lock.table', 
f'{catalog_name}') \
       .getOrCreate()
   
   spark.sql(f"DROP TABLE IF EXISTS {table_name}")
   spark.sql(f"CREATE TABLE {table_name} (id bigint NOT NULL, data string) 
USING iceberg")
   spark.sql(f"CALL {catalog_name}.system.remove_orphan_files(table => 
'{sub_name}')").show()
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to