WillAyd commented on code in PR #900:
URL: https://github.com/apache/arrow-adbc/pull/900#discussion_r1261422328


##########
c/driver/sqlite/statement_reader.c:
##########
@@ -120,6 +120,12 @@ static AdbcStatusCode ArrowTimestampToIsoString(int64_t 
value, enum ArrowTimeUni
       break;
   }
 
+  rem = value % scale;

Review Comment:
   Fixes a bug where negative values where only changing the fractional part 
and not offseting the date, i.e. you'd get `1970-01-01T00:00:00.958` with ms 
precision instead of the expected `1969-12-31T23:59:59.958`



##########
c/driver/sqlite/statement_reader.c:
##########
@@ -120,6 +120,12 @@ static AdbcStatusCode ArrowTimestampToIsoString(int64_t 
value, enum ArrowTimeUni
       break;
   }
 
+  rem = value % scale;

Review Comment:
   Fixes a bug where negative values were only changing the fractional part and 
not offseting the date, i.e. you'd get `1970-01-01T00:00:00.958` with ms 
precision instead of the expected `1969-12-31T23:59:59.958`



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