Gabriel39 commented on code in PR #68873:
URL: https://github.com/apache/doris/pull/68873#discussion_r4237053272


##########
fe/be-java-extensions/jdbc-scanner/src/main/java/org/apache/doris/jdbc/TrinoJdbcExecutor.java:
##########
@@ -42,13 +42,22 @@
 public class TrinoJdbcExecutor extends BaseJdbcExecutor {
     private static final DateTimeFormatter TIMESTAMP_TZ_WRITE_FORMATTER =
             DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss.SSSSSS");
+    private static final DateTimeFormatter ARRAY_TIMESTAMP_FORMATTER = new 
java.time.format.DateTimeFormatterBuilder()
+            .appendPattern("uuuu-MM-dd HH:mm:ss")
+            .appendFraction(java.time.temporal.ChronoField.NANO_OF_SECOND, 0, 
9, true)
+            .appendLiteral(' ').appendZoneOrOffsetId().toFormatter();
 
     public TrinoJdbcExecutor(byte[] thriftParams) throws Exception {
         super(thriftParams);
     }
 
     @Override
     protected void setTimestampTz(int parameterIndex, LocalDateTime value) 
throws SQLException {
+        if (config != null && config.getTableType() == 
org.apache.doris.thrift.TOdbcTableType.PRESTO) {
+            // PrestoDB requires VARCHAR plus a server-side cast; its driver 
rejects JDBC type 2014.

Review Comment:
   Fixed in 88625ed939. Both Presto integration paths now set tableType=PRESTO, 
exercising the VARCHAR binder and untyped getTimestamp reader. The write helper 
uses the production CAST placeholder, and readback no longer calls unsupported 
typed getObject on the Presto branch. Both tests passed with PrestoSQL JDBC 350 
against Trino 481 configured for the Presto protocol, under all three JVM time 
zones. A standalone PrestoDB server was not used.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to