yuqi1129 commented on code in PR #7629:
URL: https://github.com/apache/gravitino/pull/7629#discussion_r2196940524


##########
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:
   The message is incorrect. How do you know the version is not between 435 and 
439 here?



##########
docs/trino-connector/configuration.md:
##########
@@ -13,3 +13,4 @@ license: "This software is licensed under the Apache License 
version 2."
 | trino.jdbc.user                             | string  | admin                
 | The jdbc user name of current Trino.                                         
                                                                                
                                                                                
                                                                       | NO     
  | 0.5.1         |
 | trino.jdbc.password                         | string  | (none)               
 | The jdbc password of current Trino.                                          
                                                                                
                                                                                
                                                                       | NO     
  | 0.5.1         |
 | gravitino.metadata.refresh-interval-seconds | integer | 10                   
 | The `gravitino.metadata.refresh-interval-seconds` defines the interval in 
seconds to refresh metadata from Gravitino server, the default value is 10 
seconds.                                                                        
                                                                               
| No       | 0.9.0         |
+| gravitino.trino.skip-version-validation     | boolean | false                
 | The `gravitino.trino.skip-version-validation` defines whether skip Trino 
version validation or not. Note other versions of Trino have not undergone 
thorough testing with Gravitino, so there may be compatiablity problem if true. 
                                                                                
| No       | 1.0.0         |

Review Comment:
   "Note that Gravitino only supports Trino 425 to 439 and other versions of 
Trino..."



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