hqbhoho opened a new issue, #7691:
URL: https://github.com/apache/gravitino/issues/7691

   ### Describe the feature
   
   Currently, some ConnectorMetadata API was changed in trino new version. eg:
   
       /**
        * Finish insert query (Trino 440)
        */
       default Optional<ConnectorOutputMetadata> finishInsert(
               ConnectorSession session,
               ConnectorInsertTableHandle insertHandle,
               List<ConnectorTableHandle> sourceTableHandles,
               Collection<Slice> fragments,
               Collection<ComputedStatistics> computedStatistics)
       {
           throw new TrinoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata 
beginInsert() is implemented without finishInsert()");
       }
   
       /**
        * Finish insert query (Trino 435)
        */
       default Optional<ConnectorOutputMetadata> finishInsert(
              ConnectorSession session, 
              ConnectorInsertTableHandle insertHandle, 
              Collection<Slice> fragments, 
              Collection<ComputedStatistics> computedStatistics)
       {
           throw new TrinoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata 
beginInsert() is implemented without finishInsert()");
       }
   
   So some SQL will failed because of incompatible API. 435 is one year ago 
version.
   
   ### Motivation
   
   Support high version Trino.
   
   
   
   ### Describe the solution
   
   We can support both of the following approaches simultaneously:
   1.  Upgrade the trino connector for high trino version.
   2.  Support direct mode by configuration. Grivitinno only manage catalog 
configuration.
   
   With this approach 2,  we can  use `create catalog xxxx using mysql` rathar 
than `create catalog xxxx using gravitino` in direct mode.   Although Gravitino 
cannot participate in the Trino query execution process, which makes it 
impossible to support certain advanced features, but it can reduce depend on 
trino version. 
   
   ### Additional context
   
   _No response_


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