You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/31 00:28:35 UTC

[GitHub] [arrow-datafusion] sergiimk commented on issue #959: SELECT ... ORDER BY query fails on data with int64 timestamp field

sergiimk commented on issue #959:
URL: https://github.com/apache/arrow-datafusion/issues/959#issuecomment-908801485


   Thanks for the prompt reply @jorgecarleitao.
   
   I followed your advise of re-casting and this query works:
   
   ```sql
   SELECT
     CAST(system_time as TIMESTAMP) as system_time, 
     CAST(reported_date as TIMESTAMP) as reported_date,
     province, 
     total_daily
   FROM test
   ORDER BY reported_date
   ```
   
   Linking the corresponding arrow issue: apache/arrow-rs#393
   
   I wonder if the impact of not having timezone support in Arrow can be minimized somehow, e.g. by treating `Timestamp(a, None)` as equal to `Timestamp(a, Some("UTC"))`.
   
   When reading parquet files produced by Spark the timestamps are being encoded as plain `INT96` with no logical types, so it seems DataFusion already defaults to UTC?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org