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 2022/11/07 06:25:42 UTC

[GitHub] [arrow-rs] gruuya opened a new pull request, #3038: Enable casting from Date64 to Timestamp

gruuya opened a new pull request, #3038:
URL: https://github.com/apache/arrow-rs/pull/3038

   # Which issue does this PR close?
   
   Closes #3037 
   
   # Rationale for this change
    
   I'm working on adding support for [remote tables](https://github.com/splitgraph/seafowl/pull/190) in Seafowl (in analogy with PG FDWs) using the connector-x crate. An issue that comes up is the fact that connector-x uses arrow's Date64 as the target type for coercion of various datetime/timestamp types from other DBs.
   
   More specifically, Postgres TIMESTAMP [is converted into](https://github.com/sfu-db/connector-x/blob/9bc2bf455fd0a9ad3e8ff7834694fb317b497f4a/connectorx/src/transports/postgres_arrow.rs#L53) Date64. On the other hand, Datafusion [interprets](https://arrow.apache.org/datafusion/user-guide/sql/data_types.html#date-time-types) TIMESTAMP type as arrow's Timestamp(TimeUnit::Nanosecond, None). Consequently, I end up needing to cast from Date64 (as returned by connector-x) into Timestamp (as expected by Datafusion), but such cast is not supported at the moment.
   
   # What changes are included in this PR?
   
   I expanded the cast kernel to facilitate the Date64 -> Timestamp cast, as well as the `can_cast_types` function to reflect this.
   
   # Are there any user-facing changes?
   
   Trying to cast from Date64 to Timestamp will not error out after this; not sure whether this warrants a doc change somewhere.
   


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


[GitHub] [arrow-rs] ursabot commented on pull request #3038: Enable casting from Date64 to Timestamp

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3038:
URL: https://github.com/apache/arrow-rs/pull/3038#issuecomment-1306080604

   Benchmark runs are scheduled for baseline = 4df1cc43e7010fa66f38db42abf3d7129b31c539 and contender = 951caed784876d15a9e712a5981de31cee4e3085. 951caed784876d15a9e712a5981de31cee4e3085 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/87aa010093f147ee95860b5feca594a7...ad76882627c04aceb224e67065a3019d/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/4a4de6c4573e4c3183b062a00b587295...12ff10d9bc004bbd96b7f4360bba38fd/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/729c18514dd14b46815102069048bd2e...0c76961fe7dc47afafdb5c879a54c22c/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/cdb0fa0ac6b54c2d8292d3afe41f808c...65c79099a91c44bf98330b27071621cb/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


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


[GitHub] [arrow-rs] tustvold merged pull request #3038: Enable casting from Date64 to Timestamp

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #3038:
URL: https://github.com/apache/arrow-rs/pull/3038


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