Closed danhuawang closed 3 months ago
create schema with upper case name create table under the schema, fill in the api path parameter with the schema lower case name list schema in api show schemas under catalog in trino the result are different
@danhuawang Can you give detailed information and steps so that I can reproduce it locally, I have checked the steps you mentioned, but everything seems fine for me.
- create schema with upper case name in api
- create table under the schema in trino, fill in the api path parameter with the schema lower case name
create schema with upper case name in api create table under the schema in trino, using the schema lower case name
@danhuawang This is a bug caused by Trino and Iceberg.
Then Iceberg will create a new schema in lowercase.
@FANNG1 We should work together to resolve this issue.
Another scenerio: rename catalog name from lower case to upper case in UI, then go to trino to create schema ,encounter catalog not exist issue.
gravitino
jmx
memory
metalake_demo.CATALOG_HIVE
metalake_demo.ICE1
system
tpcds
tpch
(8 rows)
Query 20240204_111303_00013_h2i2r, FINISHED, 1 node Splits: 19 total, 19 done (100.00%) 0.05 [0 rows, 0B] [0 rows/s, 0B/s]
trino> CREATE SCHEMA "metalake_demo.CATALOG_HIVE".database_01; Query 20240204_111759_00014_h2i2r failed: line 1:1: Catalog 'metalake_demo.catalog_hive' does not exist CREATE SCHEMA "metalake_demo.CATALOG_HIVE".database_01
trino> CREATE SCHEMA "metalake_demo.catalog_hive".database_01; Query 20240204_111848_00015_h2i2r failed: line 1:1: Catalog 'metalake_demo.catalog_hive' does not exist CREATE SCHEMA "metalake_demo.catalog_hive".database_01
This issue is because Trino will convert all schema names to lower case and there will be case-related issues between Gravitino and Trino. Since it's Trino's internal logic, I'm afraid it can't be fixed in a short time.
What's your opinion? @diqiu50
We don't need to fix it. When users are using Trino, they should be aware of this issue when naming tables or schemas
Version
main branch
Describe what's wrong
Error message and/or stacktrace
N/A
How to reproduce
Additional context
No response