This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new fd6ee8fce4 [#7255] improve (trino-connector): Treat the version check
for catalog names with dots as a warning. (#7256)
fd6ee8fce4 is described below
commit fd6ee8fce4928bf3a7d1476c850e06ccdc623c40
Author: Yuhui <[email protected]>
AuthorDate: Tue May 27 10:09:02 2025 +0800
[#7255] improve (trino-connector): Treat the version check for catalog
names with dots as a warning. (#7256)
### What changes were proposed in this pull request?
Treat the version check for catalog names with dots as a warning.
### Why are the changes needed?
Fix: #7255
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Manually test
---
.../gravitino/trino/connector/catalog/CatalogRegister.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogRegister.java
b/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogRegister.java
index a305ded307..f2fc5791d8 100644
---
a/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogRegister.java
+++
b/trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogRegister.java
@@ -80,11 +80,11 @@ public class CatalogRegister {
if (!config.simplifyCatalogNames()) {
int version = Integer.parseInt(context.getSpiVersion());
if (version < MIN_SUPPORT_CATALOG_NAME_WITH_METALAKE_TRINO_SPI_VERSION) {
- String errmsg =
- String.format(
- "Trino-%s does not support catalog name with dots, The minimal
required version is Trino-%d",
- trinoVersion,
MIN_SUPPORT_CATALOG_NAME_WITH_METALAKE_TRINO_SPI_VERSION);
- throw new
TrinoException(GravitinoErrorCode.GRAVITINO_UNSUPPORTED_TRINO_VERSION, errmsg);
+ LOG.warn(
+ "Trino-{} does not support catalog name with dots, The minimal
required version is Trino-{}."
+ + "Some errors may occur when using the USE <CATALOG>.<SCHEMA>
statement in Trino",
+ trinoVersion,
+ MIN_SUPPORT_CATALOG_NAME_WITH_METALAKE_TRINO_SPI_VERSION);
}
}
}