retikulum commented on issue #3832:
URL:
https://github.com/apache/arrow-datafusion/issues/3832#issuecomment-1282285012
Hi. I am asking this because I want to understand the codebase better. I
build datafusion-cli with debug, run ` SELECT
to_timestamp_micros(9065525203050843594);` and get the error. However part of
the call stack is shown as follows:
```
19: 0x7ff66b198d9e -
chrono::naive::datetime::NaiveDateTime::from_timestamp
at
.cargo\registry\src\github.com-1ecc6299db9ec823\chrono-0.4.22\src\naive\datetime\mod.rs:131
20: 0x7ff66b1d14db -
arrow_array::temporal_conversions::timestamp_us_to_datetime
at
\.cargo\registry\src\github.com-1ecc6299db9ec823\arrow-array-24.0.0\src\temporal_conversions.rs:123
21: 0x7ff66b1d3bb5 -
arrow_array::temporal_conversions::as_datetime<arrow_array::types::TimestampMicrosecondType>
at
i\.cargo\registry\src\github.com-1ecc6299db9ec823\arrow-array-24.0.0\src\temporal_conversions.rs:181
22: 0x7ff66a9be6ea -
arrow_array::array::primitive_array::PrimitiveArray<arrow_array::types::TimestampMicrosecondType>::value_as_datetime<arrow_array::types::TimestampMicrosecondType>
at
\.cargo\registry\src\github.com-1ecc6299db9ec823\arrow-array-24.0.0\src\array\primitive_array.rs:496
```
So arrow is using `from_timestamp` function in
[temporal_conversions](https://github.com/apache/arrow-rs/blob/02cab5443c0703ce5fa86647b834f184bba172ba/arrow-array/src/temporal_conversions.rs#L123)
which means there is a need for a change in this part of the code.
I think it is not releated to this issue but datafusion uses
`from_timestamp` function in following
line:https://github.com/apache/arrow-datafusion/blob/f93642fd7782b0d530a5bff0fecec020b34e9bd1/datafusion/physical-expr/src/expressions/datetime.rs#L304
So we also need to fix it. If I am wrong, could you also suggest me tips
about how to debug/analyze these bugs?
--
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]