hqbhoho commented on code in PR #7629:
URL: https://github.com/apache/gravitino/pull/7629#discussion_r2197077531
##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/CatalogRegister.java:
##########
@@ -64,12 +64,20 @@ private void checkTrinoSpiVersion(ConnectorContext context)
{
this.trinoVersion = context.getSpiVersion();
int version = Integer.parseInt(context.getSpiVersion());
- if (version < MIN_SUPPORT_TRINO_SPI_VERSION || version >
MAX_SUPPORT_TRINO_SPI_VERSION) {
- String errmsg =
- String.format(
- "Unsupported Trino-%s version. The Supported version for the
Gravitino-Trino-connector from Trino-%d to Trino-%d",
- trinoVersion, MIN_SUPPORT_TRINO_SPI_VERSION,
MAX_SUPPORT_TRINO_SPI_VERSION);
- throw new
TrinoException(GravitinoErrorCode.GRAVITINO_UNSUPPORTED_TRINO_VERSION, errmsg);
+
+ Boolean skipTrinoVersionValidation = config.isSkipTrinoVersionValidation();
+ if (!skipTrinoVersionValidation) {
+ if (version < MIN_SUPPORT_TRINO_SPI_VERSION || version >
MAX_SUPPORT_TRINO_SPI_VERSION) {
+ String errmsg =
+ String.format(
+ "Unsupported Trino-%s version. The Supported version for the
Gravitino-Trino-connector from Trino-%d to Trino-%d",
+ trinoVersion, MIN_SUPPORT_TRINO_SPI_VERSION,
MAX_SUPPORT_TRINO_SPI_VERSION);
+ throw new
TrinoException(GravitinoErrorCode.GRAVITINO_UNSUPPORTED_TRINO_VERSION, errmsg);
+ }
+ } else {
+ LOG.warn(
Review Comment:
> So, when `skipTrinoVersionValidation` is true and the current version is
between `435` and `439`, will you still output the warning message 'The version
435 has not undergone thorough testing with Gravitino'?
Oh, I see, you are right!
--
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]