TimothyDing commented on code in PR #9963:
URL: https://github.com/apache/gravitino/pull/9963#discussion_r2844041604


##########
catalogs-contrib/catalog-jdbc-hologres/src/main/java/org/apache/gravitino/catalog/hologres/converter/HologresTypeConverter.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.catalog.hologres.converter;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import java.util.Optional;
+import org.apache.gravitino.catalog.jdbc.converter.JdbcTypeConverter;
+import org.apache.gravitino.rel.types.Type;
+import org.apache.gravitino.rel.types.Types;
+import org.apache.gravitino.rel.types.Types.ListType;
+
+/**
+ * Type converter for Hologres.
+ *
+ * <p>Hologres is PostgreSQL-compatible, so type conversion follows PostgreSQL 
conventions. Hologres

Review Comment:
   @yuqi1129 
   Good point — the code is indeed very similar to PostgreSqlTypeConverter 
since Hologres is PostgreSQL-compatible at the protocol level.However, there 
are subtle but important differences that justify keeping them separate:
   Timestamp precision: Hologres does not support precision suffixes for 
TIMESTAMP/TIMESTAMPTZ (e.g., timestamptz(6) is invalid in Hologres), whereas 
PostgreSQL does. This is already reflected in the current fromGravitino() 
implementation.
   Future type divergence: Hologres has its own extended type system beyond 
standard PostgreSQL — for example, ROARINGBITMAP, JSONB with different internal 
behaviors, and potentially more Hologres-specific types in future releases. 
Keeping the converter independent makes it easier to evolve without affecting 
the PostgreSQL catalog.
   The same reasoning applies to HologresSchemaOperations vs 
PostgreSqlSchemaOperations — they share similar structure, but Hologres 
requires filtering 7 additional system schemas (e.g., hologres, hg_internal, 
hg_recyclebin, etc.) that don't exist in standard PostgreSQL.



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