danhuawang opened a new issue, #5659:
URL: https://github.com/apache/gravitino/issues/5659
### What would you like to be improved?
If the table in MySQL data source including the data type 'BOOLEAN', Trino
can't load the original data in MySQL table.
This block the data load process.
How to reproduce:
In MySQL:
```
create table my_tb06 (col_boolean BOOLEAN);
insert into my_tb06 values (true);
insert into my_tb06 values (false);
select * from my_tb06;
+-------------+
| col_boolean |
+-------------+
| 1 |
| 0 |
+-------------+
2 rows in set (0.00 sec)
```
Then create MySQL catalog in Trino, and load the data in MySQL data source:
```
trino:db1> select * from my_tb06;
Query 20241123_074016_01140_zc3ii failed: Unsupported gravitino datatype:
external(BIT)
io.trino.spi.TrinoException: Unsupported gravitino datatype: external(BIT)
at
org.apache.gravitino.trino.connector.util.GeneralDataTypeTransformer.getTrinoType(GeneralDataTypeTransformer.java:126)
at
org.apache.gravitino.trino.connector.catalog.jdbc.mysql.MySQLDataTypeTransformer.getTrinoType(MySQLDataTypeTransformer.java:57)
at
org.apache.gravitino.trino.connector.catalog.jdbc.mysql.MySQLMetadataAdapter.getColumnMetadata(MySQLMetadataAdapter.java:97)
at
org.apache.gravitino.trino.connector.catalog.CatalogConnectorMetadataAdapter.getTableMetadata(CatalogConnectorMetadataAdapter.java:79)
at
org.apache.gravitino.trino.connector.GravitinoMetadata.getTableMetadata(GravitinoMetadata.java:133)
at
io.trino.spi.connector.ConnectorMetadata.getTableSchema(ConnectorMetadata.java:256)
at
io.trino.tracing.TracingConnectorMetadata.getTableSchema(TracingConnectorMetadata.java:239)
at
io.trino.metadata.MetadataManager.getTableSchema(MetadataManager.java:454)
at
io.trino.tracing.TracingMetadata.getTableSchema(TracingMetadata.java:289)
at
io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:2291)
at
io.trino.sql.analyzer.StatementAnalyzer$Visitor.visitTable(StatementAnalyzer.java:521)
at io.trino.sql.tree.Table.accept(Table.java:60)
at io.trino.sql.tree.AstVisitor.process(AstVisitor.java:27)
```
### How should we improve?
_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]