[FEATURE] Add support for CREATE AS SELECT in the Trino connector.
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 315
Description
### Describe the feature
The usage of 'create table as select' within the Trino connector conflicts with the current implementation. Presently, within the Trino connector, DDL operations are executed by the Graviton server, while queries and write operations are carried out by specific internal connectors. During the execution of 'create table as select', if a table is created on Graviton first, and then TableOutputHandle is obtained by calling the internal connector, the internal connector will also execute the table creation operation, resulting in an error. Currently, there are two proposed solutions:
1. Do not execute the table creation operation on the Graviton server directly; instead, create the table using the internal connector.
2. Execute the table creation operation normally on the Graviton server. Then, when obtaining the TableOutputHandle by calling the function, modify the table name to avoid conflicts. After completion, rename the table back to its original name.
### Motivation
_No response_
### Describe the solution
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.