jerryshao commented on code in PR #14643:
URL: https://github.com/apache/gravitino/pull/14643#discussion_r4508908568


##########
spark-connector/spark-common/src/main/java/org/apache/gravitino/spark/connector/jdbc/GravitinoJdbcCatalog.java:
##########
@@ -46,13 +47,32 @@ public class GravitinoJdbcCatalog extends BaseCatalog {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(GravitinoJdbcCatalog.class);
 
+  private static final String PREFER_TIMESTAMP_NTZ = "preferTimestampNTZ";
+
+  private boolean useTimestampNtz;
+
   @Override
   protected TableCatalog createAndInitSparkCatalog(
       String name, CaseInsensitiveStringMap options, Map<String, String> 
properties) {
     JDBCTableCatalog jdbcTableCatalog = new JDBCTableCatalog();
     Map<String, String> all =
         getPropertiesConverter().toSparkCatalogProperties(options, properties);
     applyJdbcCredential(gravitinoCatalogClient, all);
+    if ("jdbc-postgresql".equalsIgnoreCase(gravitinoCatalogClient.provider())) 
{

Review Comment:
   preferTimestampNTZ is only validated and synced for PostgreSQL. On other 
providers a user-set value still reaches the Spark reader while the converter 
keeps TimestampType, so rows and schema can disagree; consider stripping or 
rejecting it there.



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