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

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Several Glue catalog tables cannot be used, or are used wrongly, through the 
Trino and Spark connectors:
   
   - Trino: a catalog whose name has upper-case letters is never removed from 
Trino after it is dropped, and a re-created one is never registered.
   - Trino: one column of a type Trino cannot map (interval, union, ...) makes 
the whole table unqueryable, with a Java class name and hash in the error.
   - Trino: an Iceberg table sorted by a transform fails every query with a 
`ClassCastException`.
   - Trino: `timestamp(6)` is refused for Iceberg tables, so CTAS from any 
Iceberg table with a timestamp column fails.
   - Trino: `CREATE TABLE AS SELECT` without `type` fails with a 
`NullPointerException`.
   - Trino: `SHOW CREATE TABLE` omits the storage format of Hive-format tables.
   - Spark: Iceberg tables use the Hive type mapping, so a Spark `timestamp` 
becomes an Iceberg `timestamp` without zone and `timestamp_ntz` is refused.
   
   ### Error message and/or stacktrace
   
   ```
   SELECT count(*) FROM glue_test.db.ice_sorted
   class 
org.apache.gravitino.rel.expressions.FunctionExpression$FuncExpressionImpl 
cannot be cast to class org.apache.gravitino.rel.expressions.NamedReference
   
   CREATE TABLE glue_test.db.t AS SELECT 1 AS id
   Cannot invoke "io.trino.plugin.lakehouse.TableType.ordinal()" because the 
return value of "...getTableType(java.util.Map)" is null
   ```
   
   ### How to reproduce
   
   1. Create a Glue catalog and query it from Trino through the Gravitino 
connector.
   2. Run `CREATE TABLE t AS SELECT 1 AS id` without `type`: 
NullPointerException.
   3. Create an Iceberg table with a `day(ts)` sort order and `SELECT count(*)` 
from it: ClassCastException.
   


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