fuzing opened a new issue, #12871: URL: https://github.com/apache/iceberg/issues/12871
### Apache Iceberg version 1.8.1 (latest release) ### Query engine Starrocks ### Please describe the bug 🐞 ### Query engine spark 3.5 ### Bug I'm having difficulty querying iceberg tables using thriftserver with odbc. There's no issue calling procedures such as system.rewrite_data_files and system.expire_snapshots - they work fine. I'm using a spark-iceberg docker container and the entrypoint.sh looks similar to: ``` start-master.sh -p 7077 start-worker.sh spark://spark-iceberg:7077 start-history-server.sh start-thriftserver.sh --driver-java-options "-Dderby.system.home=/tmp/derby" \ --packages "org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.8.1,org.apache.iceberg:iceberg-aws-bundle:1.8.1" \ --conf "spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions" \ --conf "spark.sql.catalogImplementation=in-memory" \ --conf "spark.sql.defaultCatalog=somecatalog" \ --conf "spark.sql.catalog.somecatalog=org.apache.iceberg.spark.SparkCatalog" \ --conf "spark.sql.catalog.somecatalog.warehouse=s3://bucket-name" \ --conf "spark.sql.catalog.somecatalog.s3.endpoint=http://minio:9005" \ --conf "spark.sql.catalog.somecatalog.uri=http://iceberg-rest:8181" \ --conf "spark.sql.catalog.somecatalog.type=rest" \ --conf "spark.sql.catalog.somecatalog.io-impl=org.apache.iceberg.aws.s3.S3FileIO" tail -f /dev/null ``` Querying through odbc with the following works fine (i.e. snapshots are expired): ``` CALL system.expire_snapshots( table => 'somecatalog.analytics.events', older_than => TIMESTAMP '2025-04-01 00:00:00.000'); ``` However the following query does not: ``` SELECT * FROM somecatalog.analytics.events LIMIT 5; ``` It comes back with the following error: ``` Table or view not found: somecatalog.analytics.events ``` Note that the following two examples work through odbc/thriftserver: ``` SHOW NAMESPACES; ``` results in: ``` [ { "namespace": "analytics" } ] ``` which is correct, and: ``` SHOW TABLES IN somecatalog.analytics; ``` results in: ``` [ { "namespace": "analytics", "tableName": "events", "isTemporary": "0" }, { "namespace": "analytics", "tableName": "sessions", "isTemporary": "0" } ] ``` which is also correct (i.e. two tables). If I run the same select query with spark-sql, it does work, as depicted here: ``` spark-sql \ --packages "org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.8.1,org.apache.iceberg:iceberg-aws-bundle:1.8.1" \ --conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \ --conf spark.sql.defaultCatalog=somecatalog \ --conf spark.sql.catalogImplementation=in-memory \ --conf spark.sql.catalog.somecatalog.uri=http://iceberg-rest:8181/ \ --conf spark.sql.catalog.somecatalog.type=rest \ --conf spark.sql.catalog.fusing.warehouse=s3://bucket-name \ --conf spark.sql.catalog.somecatalog=org.apache.iceberg.spark.SparkCatalog \ --conf spark.sql.catalog.somecatalog.io-impl=org.apache.iceberg.aws.s3.S3FileIO \ --conf spark.sql.catalog.somecatalog.s3.endpoint=http://minio:9005 ``` Then: ``` SELECT * FROM somecatalog.analytics.events LIMIT 5; ``` This works fine. I'm also using starrocks for read-only access to the catalog and table, and this also works fine for querying. Any assistance on how to get the thriftserver working correctly for SQL queries would be much appreciated. I'm passing AWS/S3 credentials in environment variables, and for ODBC I'm using a very current Simba ODBC connector. Thank you! ### Willingness to contribute - [ ] I can contribute a fix for this bug independently - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [ ] I cannot contribute a fix for this bug at this time -- 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-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org