datastrato / gravitino

World's most powerful data catalog service with providing a high-performance, geo-distributed and federated metadata lake.
https://datastrato.ai/docs/
Apache License 2.0
347 stars 150 forks source link

[Bug report] `TrinoContainer#checkSyncCatalogFromGravitino` will always return `false` #3237

Closed xiaozcy closed 2 weeks ago

xiaozcy commented 2 weeks ago

Version

main branch

Describe what's wrong

In #2433 , we use simple catalog name in Trino connector. In that case, when we execute SHOW CATALOGS in Trino, it returns the original catalog names in Trino (without {metalake}. prefix).

But in com.datastrato.gravitino.integration.test.container.TrinoContainer#checkSyncCatalogFromGravitino, we use format("SHOW CATALOGS LIKE '%s.%s'", metalakeName, catalogName) to match the result of the execution, which means this method will always return false. Besides, we never verify the return value of this method where it is called, so the current test can still be executed successfully.

Error message and/or stacktrace

N/A

How to reproduce

Use format("SHOW CATALOGS LIKE '%s'", catalogName) instead, and verify the return value of this method where it is called.

Additional context

No response

yuqi1129 commented 2 weeks ago

@xiaozcy Thanks for your contribution.