waitingkuo commented on code in PR #4186:
URL: https://github.com/apache/arrow-datafusion/pull/4186#discussion_r1021209708


##########
datafusion/common/src/parsers.rs:
##########
@@ -29,73 +29,74 @@ pub fn parse_interval(leading_field: &str, value: &str) -> 
Result<ScalarValue> {
     // INTERVAL '0.5 MONTH' = 15 days, INTERVAL '1.5 MONTH' = 1 month 15 days
     // INTERVAL '0.5 DAY' = 12 hours, INTERVAL '1.5 DAY' = 1 day 12 hours
     let align_interval_parts =
-        |month_part: f32, mut day_part: f32, mut milles_part: f32| -> (i32, 
i32, f32) {
+        |month_part: f64, mut day_part: f64, mut nanos_part: f64| -> (i64, 
i64, f64) {
             // Convert fractional month to days, It's not supported by Arrow 
types, but anyway
-            day_part += (month_part - (month_part as i32) as f32) * 30_f32;
+            day_part += (month_part - (month_part as i64) as f64) * 30_f64;
 
             // Convert fractional days to hours
-            milles_part += (day_part - ((day_part as i32) as f32))
-                * 24_f32
+            nanos_part += (day_part - ((day_part as i64) as f64))
+                * 24_f64
                 * SECONDS_PER_HOUR
-                * MILLIS_PER_SECOND;
+                * NANOS_PER_SECOND;
 
-            (month_part as i32, day_part as i32, milles_part)
+            (month_part as i64, day_part as i64, nanos_part)

Review Comment:
   👍 



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