Re: Avatica ResultSet#getString for Timestamp column type

2025-08-25 Thread Yanjing Wang
Thanks Julian, updated. Best, Yanjing Wang Julian Hyde 于2025年8月23日周六 01:18写道: > Thanks for logging this. It was a subtle issue that we have overlooked for > many years. > > Please change “Timestamp” to “TIMESTAMP” so it’s clear we are taking about > the SQL type not the Java type. > > Also copy

Re: Avatica ResultSet#getString for Timestamp column type

2025-08-22 Thread Julian Hyde
Thanks for logging this. It was a subtle issue that we have overlooked for many years. Please change “Timestamp” to “TIMESTAMP” so it’s clear we are taking about the SQL type not the Java type. Also copy-paste into the description the relevant text from the JDBC spec. Please broaden the scop

Re: Avatica ResultSet#getString for Timestamp column type

2025-08-20 Thread Yanjing Wang
Thanks Istvan, I logged it. CALCITE-7143 Istvan Toth 于2025年8月19日周二 13:32写道: > While the JDBC spec often leaves a lot to interpretation, in this case it > is explicit: > https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html

Re: Avatica ResultSet#getString for Timestamp column type

2025-08-18 Thread Istvan Toth
While the JDBC spec often leaves a lot to interpretation, in this case it is explicit: https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html Please open a JIRA ticket for the getPrecision issue. On Mon, Aug 18, 2025 at 2:33 PM Yanjing Wang wrote: > Hi Justin, Thank you for yo

Re: Avatica ResultSet#getString for Timestamp column type

2025-08-18 Thread Yanjing Wang
Hi Justin, Thank you for your detailed explanation about timestamp precision handling across different databases. While investigating this further, I noticed an important difference in how precision is interpreted: In MySQL, ResultSetMetadata#getPrecision() returns the total length of the timestamp

Re: Avatica ResultSet#getString for Timestamp column type

2025-08-18 Thread Justin Swanhart
TIMESTAMP values in MySQL (and I think Clickhouse and Doris) can return fractional seconds but only when requested. Try "SELECT NOW(6);" for example, which will return a fractional timestamp. The SQL standard includes 6 places of precision by default, but other databases like MySQL default to 0.