[ 
https://issues.apache.org/jira/browse/CALCITE-7143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yanjing.wang updated CALCITE-7143:
----------------------------------
    Description: 
An inconsistency has been identified in how Avatica handles TIMESTAMP string 
representation compared to other implementations:

ResultSet#getString() Behavior:
Current Behavior:
 * Avatica: Returns 'yyyy-MM-dd HH:mm:ss.ppppp...' (with precision digits)
 * Other implementations (Oracle): treat precision as column size rather than 
decimal number size. ResultSetMetaData#getPrecision(): Get the designated 
column's specified column size.

Expected Behavior:
 * precision should be column size when Timestamp#getString method is invoked.

References:
 * JDBC Specification: 
[https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html]
 * [https://lists.apache.org/thread/n4rprwtdw4h3s0mqxhkz7rmr4776opnj]

Also fix for DATE,TIME, TIMESTAMP WITH TIME ZONE, etc.

  was:
An inconsistency has been identified in how Avatica handles TIMESTAMP string 
representation compared to other implementations:

ResultSet#getString() Behavior:
Current Behavior:
 * Avatica: Returns 'yyyy-MM-dd HH:mm:ss.ppppp...' (with precision digits)
 * Other implementations (Oracle): treat precision as column size rather than 
decimal number size

Expected Behavior:
 * precision should be column size when Timestamp#getString method is invoked

References:
 * JDBC Specification: 
https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html
 * https://lists.apache.org/thread/n4rprwtdw4h3s0mqxhkz7rmr4776opnj


> getString for TIMESTAMP should interpret precision as column size, not 
> decimal places
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7143
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7143
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.26.0
>            Reporter: yanjing.wang
>            Priority: Major
>
> An inconsistency has been identified in how Avatica handles TIMESTAMP string 
> representation compared to other implementations:
> ResultSet#getString() Behavior:
> Current Behavior:
>  * Avatica: Returns 'yyyy-MM-dd HH:mm:ss.ppppp...' (with precision digits)
>  * Other implementations (Oracle): treat precision as column size rather than 
> decimal number size. ResultSetMetaData#getPrecision(): Get the designated 
> column's specified column size.
> Expected Behavior:
>  * precision should be column size when Timestamp#getString method is invoked.
> References:
>  * JDBC Specification: 
> [https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html]
>  * [https://lists.apache.org/thread/n4rprwtdw4h3s0mqxhkz7rmr4776opnj]
> Also fix for DATE,TIME, TIMESTAMP WITH TIME ZONE, etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to