markhoerth opened a new issue, #10698:
URL: https://github.com/apache/gravitino/issues/10698

   When attempting to query an Iceberg catalog through the Gravitino Spark 
connector, the following error is thrown:
   
   spark-sql (nyc_taxi)> use iceberg_nyc.nyc_taxi
                       > ;
   26/04/07 05:05:22 ERROR SparkSQLDriver: Failed in [use iceberg_nyc.nyc_taxi
   ]
   java.lang.IllegalArgumentException: Doesn't support multi level namespaces: 
iceberg_nyc.nyc_taxi
           at 
org.apache.gravitino.shaded.com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
           at 
org.apache.gravitino.spark.connector.catalog.BaseCatalog.validateNamespace(BaseCatalog.java:533)
           at 
org.apache.gravitino.spark.connector.catalog.BaseCatalog.loadNamespaceMetadata(BaseCatalog.java:358)
           at 
org.apache.spark.sql.connector.catalog.SupportsNamespaces.namespaceExists(SupportsNamespaces.java:98)
           at 
org.apache.spark.sql.connector.catalog.CatalogManager.assertNamespaceExist(CatalogManager.scala:109)
           at 
org.apache.spark.sql.connector.catalog.CatalogManager.setCurrentNamespace(CatalogManager.scala:127)
   
   Where iceberg_nyc is the Gravitino catalog, nyc_taxi is the schema, and 
yellow_trips is the table — standard three-level catalog.schema.table 
addressing. The same catalog and table are queryable via Trino without issue. 
   
   trino> show catalogs
       -> ;
       Catalog
   ---------------
    gravitino
    hive_lakefs
    hive_nyc
    iceberg_nyc
    jmx
    memory
    postgres_demo
    system
    tpcds
    tpch
   (10 rows)
   
   Query 20260407_050630_00002_df6yw, FINISHED, 1 node
   Splits: 7 total, 7 done (100.00%)
   0.04 [0 rows, 0B] [0 rows/s, 0B/s]
   
   trino> show schemas in iceberg_nyc;
          Schema
   --------------------
    information_schema
    nyc_taxi
    view_test
   (3 rows)
   
   Query 20260407_050644_00003_df6yw, FINISHED, 1 node
   Splits: 7 total, 7 done (100.00%)
   0.18 [3 rows, 50B] [16 rows/s, 272B/s]
   
   trino> show tables in iceberg_nyc.nyc_taxi
       -> ;
       Table
   --------------
    yellow_trips
   (1 row)
   
   Query 20260407_050717_00004_df6yw, FINISHED, 1 node
   Splits: 7 total, 7 done (100.00%)
   0.18 [1 rows, 30B] [5 rows/s, 166B/s]
   
   trino> select * from iceberg_nyc.nyc_tax.yellow_trips;
   Query 20260407_050733_00005_df6yw failed: line 1:15: Schema 'nyc_tax' does 
not exist
   select * from iceberg_nyc.nyc_tax.yellow_trips
   
   trino>  select * from iceberg_nyc.nyc_taxi.yellow_trips;
    vendorid |    tpep_pickup_datetime    |   tpep_dropoff_datetime    | 
passenger_count | trip_distance | ratecodeid | store>
   
----------+----------------------------+----------------------------+-----------------+---------------+------------+------>
           2 | 2024-01-24 15:17:12.000000 | 2024-01-24 15:34:53.000000 |        
       1 |          3.33 |          1 | N    >
           2 | 2024-01-24 15:52:24.000000 | 2024-01-24 16:01:39.000000 |        
       1 |          1.61 |          1 | N    >
           2 | 2024-01-24 15:08:55.000000 | 2024-01-24 15:31:35.000000 |        
       1 |          4.38 |          1 | N    >
           2 | 2024-01-24 15:42:55.000000 | 2024-01-24 15:51:35.000000 |        
       1 |          0.95 |          1 | N    
   
   The problem is specific to the Gravitino Spark connector in 1.2.0. 


-- 
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]

Reply via email to