xborder commented on PR #1081:
URL: https://github.com/apache/arrow-java/pull/1081#issuecomment-4126081049

   I think there's still a risk of having stale parameters.
   Example:
   ```
   Statement st = Statement.createStatement("SELECT * FROM table WHERE ts = ?")
   Timestamp ts = new Timestamp(TEST_EPOCH_MILLIS_WITH_FRACTIONAL_SECONDS);
       ts.setNanos(869885001);
   st.setTimestamp(1, ts);
   st.Long(1, 1774261392);
   ```
   
   The final query should be `SELECT * FROM table WHERE ts = 1774261392` and I 
think this will fetch the raw timestamps instead.
   
   The issue is mainly with the approach taken. Having a map of index to 
timestamp means that there are other scenarios where the index can be updated 
but the map isn't unless we override all the setters functions to keep it 
up-to-date. I'm not sure what is the best approach here.
   In the long run fixing the precision in Avatica would be ideal (I believe 
that is where the root-cause is)


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