[FEATURE] Support high version Trino
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### Describe the feature
Currently, some ConnectorMetadata API was changed in trino new version. eg:
/**
* Finish insert query (Trino 440)
*/
default Optional finishInsert(
ConnectorSession session,
ConnectorInsertTableHandle insertHandle,
List sourceTableHandles,
Collection fragments,
Collection computedStatistics)
{
throw new TrinoException(GENERIC_INTERNAL_ERROR, "ConnectorMetadata beginInsert() is implemented without finishInsert()");
}
/**
* Finish insert query (Trino 435)
*/
default Optional finishInsert(
ConnectorSession session,
ConnectorInsertTableHandle insertHandle,
Collection fragments,
Collection 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 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_
Contributor guide
Research direction
The issue names no files or tests; start by locating the ConnectorMetadata implementations and the connector integration entry points that handle finishInsert. Review the Trino 435 and 440 API signatures, then verify that the selected approach supports the targeted higher Trino versions or the proposed direct-mode catalog configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100