Sanskriti Bora created CALCITE-7170:
---------------------------------------

             Summary: Support ISO String Binding for Date/Time/Timestamp in 
Avatica
                 Key: CALCITE-7170
                 URL: https://issues.apache.org/jira/browse/CALCITE-7170
             Project: Calcite
          Issue Type: Improvement
          Components: avatica
            Reporter: Sanskriti Bora


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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to