yuqi1129 commented on code in PR #14643:
URL: https://github.com/apache/gravitino/pull/14643#discussion_r4509064256
##########
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:
Fixed in 36fb008574. Non-PostgreSQL providers now explicitly use
`preferTimestampNTZ=false`, normalizing all case variants to match the
converter. Simply stripping the key would still inherit
`spark.sql.timestampType=TIMESTAMP_NTZ`, so that session-default case is
covered too. PostgreSQL's opt-in and validation remain unchanged.
Added configuration regressions across the other JDBC providers and a real
MySQL test for catalog/bypass/session settings, reader-schema alignment, rows
and aggregates; updated the connector docs. Spark 3.5.3 and 4.0.3: 85 JDBC
cases each, all passed. The new non-PostgreSQL configuration and MySQL
reader-schema assertions fail with the previous initializer.
--
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]