You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "spebern (via GitHub)" <gi...@apache.org> on 2023/03/09 19:00:09 UTC

[GitHub] [arrow-rs] spebern opened a new pull request, #3835: Support timestamp/time and date json decoding

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

   # Which issue does this PR close?
   
   Closes #3834.
   
   # Rationale for this change
   
   # What changes are included in this PR?
   
   Support json decoding of
   - Time32
   - Time64
   - Timestamp
   - Date32
   - Date64
   in raw decoder.
   
   # Are there any user-facing changes?
   
   The previous json reader was a little bit more flexible, because it supported passing format strings:
   https://github.com/apache/arrow-rs/blob/495682aa72ffe92bbd0d6d8d93e0c00b5483ff7d/arrow-json/src/reader.rs#L603
   


-- 
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 commented on pull request #3835: Support timestamp/time and date json decoding

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #3835:
URL: https://github.com/apache/arrow-rs/pull/3835#issuecomment-1464948773

   FYI added timezone support in https://github.com/apache/arrow-rs/pull/3845


-- 
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 #3835: Support timestamp/time and date json decoding

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #3835:
URL: https://github.com/apache/arrow-rs/pull/3835


-- 
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 #3835: Support timestamp/time and date json decoding

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #3835:
URL: https://github.com/apache/arrow-rs/pull/3835#issuecomment-1463674666

   Benchmark runs are scheduled for baseline = 495682aa72ffe92bbd0d6d8d93e0c00b5483ff7d and contender = 61c4f12e84330db243789fc98375512d67628e57. 61c4f12e84330db243789fc98375512d67628e57 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/8489a99c55e84d7ca1c913bef7fb48db...6b9af55d74314e54b67c097c96f416d3/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/e0142e93d7d04d3e91cc72cdf28acbea...511b4189f35c41d39d0c18e8d86a9134/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/473bc0c6e8e84b398ae46c272f2a3224...96be0179aaca4ef2b06dba6000f5379b/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/696229cdab8d4faf885e30b0e7cec822...4aed29ee25f840c78bb9e1d5a714d671/)
   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 commented on a diff in pull request #3835: Support timestamp/time and date json decoding

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #3835:
URL: https://github.com/apache/arrow-rs/pull/3835#discussion_r1132231093


##########
arrow-json/src/raw/mod.rs:
##########
@@ -293,6 +293,16 @@ fn make_decoder(
         data_type => (primitive_decoder, data_type),
         DataType::Float32 => primitive_decoder!(Float32Type, data_type),
         DataType::Float64 => primitive_decoder!(Float64Type, data_type),
+        DataType::Timestamp(TimeUnit::Second, _) => primitive_decoder!(TimestampSecondType, data_type),
+        DataType::Timestamp(TimeUnit::Millisecond, _) => primitive_decoder!(TimestampMillisecondType, data_type),
+        DataType::Timestamp(TimeUnit::Microsecond, _) => primitive_decoder!(TimestampMicrosecondType, data_type),
+        DataType::Timestamp(TimeUnit::Nanosecond, _) => primitive_decoder!(TimestampNanosecondType, data_type),

Review Comment:
   ```suggestion
           DataType::Timestamp(TimeUnit::Second, None) => primitive_decoder!(TimestampSecondType, data_type),
           DataType::Timestamp(TimeUnit::Millisecond, None) => primitive_decoder!(TimestampMillisecondType, data_type),
           DataType::Timestamp(TimeUnit::Microsecond, None) => primitive_decoder!(TimestampMicrosecondType, data_type),
           DataType::Timestamp(TimeUnit::Nanosecond, None) => primitive_decoder!(TimestampNanosecondType, data_type),
   ```
   
   I think this code doesn't correctly handle timestamps, in particular the returned arrays won't have the timestamp set. 
   
   There is also an issue with the way the Parser implementation in general handles timezones - https://github.com/apache/arrow-rs/issues/1936
   
   I would just leave off support for now



-- 
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] spebern commented on pull request #3835: Support timestamp/time and date json decoding

Posted by "spebern (via GitHub)" <gi...@apache.org>.
spebern commented on PR #3835:
URL: https://github.com/apache/arrow-rs/pull/3835#issuecomment-1463624534

   Thanks for your work on the raw decoder. It is really easy to add support for new types.


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