sanskritimbora opened a new pull request, #292:
URL: https://github.com/apache/calcite-avatica/pull/292

   I would like to propose adding support for binding ISO-formatted string 
values to date, time, and timestamp types in Avatica. Currently, Avatica only 
supports binding these types using Java objects (such as java.sql.Date, 
java.sql.Time, and java.sql.Timestamp), which can be limiting for clients that 
work with standard string representations.
   
   Adding ISO string binding would improve interoperability and make it easier 
to work with standard date/time formats across different clients and languages.
   
    
   Simple client use case example:
   try (var connection = 
DriverManager.getConnection("jdbc:arrow-flight://localhost:5000;useEncryption=false");
   {{ PreparedStatement createSchemaStatement = 
connection.prepareStatement("create schema if not exists foo");}}
   {{ PreparedStatement createTableStatement = 
connection.prepareStatement("create table if not exists foo.bar (t time, d 
date, ts timestamp)");}}
   {{ PreparedStatement insertStatement = connection.prepareStatement("insert 
into test values (?, ?, ?)")}}
   ) {
   {{ createSchemaStatement.execute();}}
   {{ createTableStatement.execute();}}
   
   {{ insertStatement.setString(1, "2025-08-14T15:53:00.000Z");}}
   {{ insertStatement.setString(2, "2025-04-01");}}
   {{ insertStatement.setString(3, "21:39:50");}}
   {{ }}
   {{ insertStatement.executeUpdate();}}
   }
   
   


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