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


##########
catalogs-contrib/catalog-jdbc-clickhouse/src/main/java/org/apache/gravitino/catalog/clickhouse/converter/ClickHouseTypeConverter.java:
##########
@@ -141,7 +158,9 @@ public Type toGravitino(JdbcTypeBean typeBean) {
         return Types.FixedCharType.of(typeBean.getColumnSize());
       case DATE:
         return Types.DateType.get();
-        // No type mapping for date32, we will use external type to handle it.
+      case DATE32:
+        // Date32 supports 1900-2299 vs Date's 1970-2149. Use ExternalType to 
preserve round-trip.
+        return Types.ExternalType.of(DATE32);

Review Comment:
   We haven't handled most types that can't be converted to the Gravitino type, 
as engines like Trino will not recognize `externalType`.  Adding this type is 
designed to display types that are created by the catalog itself in Gravitino.  
As for how to use this type uniformly in engines, there is no clear solution 
now. anyway, this PR is useful and valuable. 



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