haohuaijin commented on PR #26111:
URL: https://github.com/apache/datafusion/pull/26111#issuecomment-6217832698
Thanks for your reviews @jayzhan211 , i added both func for all
`to_timestamp_xxx` functions and preserving input strictness use below code:
```rust
fn strictly_order_preserving(&self, input: &[ExprProperties]) ->
Result<bool> {
Ok(is_integer_input(input) && input[0].strictly_order_preserving)
}
```
because the a lossy cast intput can result in wrong result becuase of remove
sort:
```sql
-- Input ordered by (epoch_seconds, id):
-- (1.1, 1), (1.9, 0)
SELECT to_timestamp_seconds(CAST(epoch_seconds AS BIGINT)) AS t, id
FROM ordered_epoch
ORDER BY t, id;
```
Both timestamps become equal, so `id` still needs sorting.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]