You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/02/14 15:27:11 UTC

[GitHub] [arrow-rs] tustvold opened a new pull request, #3718: Deprecate old JSON reader (#3610)

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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Part of #3610
   
   # Rationale for this change
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   Deprecate the old reader to encourage people to switch to the new reader
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
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 #3718: Deprecate old JSON reader (#3610)

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

   Benchmark runs are scheduled for baseline = 61ea9f226dbc90ed989722b5b534cfeaf33e01be and contender = 6bf0aab6bbc0a6a4cc89affd7552af515edc1c38. 6bf0aab6bbc0a6a4cc89affd7552af515edc1c38 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/797e58058dca4c05ac8df4c7b1bf21b8...70f773a76fba417f923b59201075101a/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/fe5f4e7a181148ada983a74f120ae07f...bbab579733f34b3d8e277c7bb3933433/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/9cdd3b7d2b1e4157b8c7221ed6a07bdf...45ef237122784f8798bdff0cca6bad42/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/83c0b84db20747e08ff715d6585410d0...3484b02c01094e1cb8122a9b82a09d9e/)
   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] viirya commented on a diff in pull request #3718: Deprecate old JSON reader (#3610)

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


##########
parquet/src/arrow/arrow_writer/levels.rs:
##########
@@ -1121,7 +1121,7 @@ mod tests {
         // Note: we are using the JSON Arrow reader for brevity
         let json_content = r#"
         {"stocks":{"long": "$AAA", "short": "$BBB"}}
-        {"stocks":{"long": null, "long": "$CCC", "short": null}}
+        {"stocks":{"long": "$CCC", "short": null}}

Review Comment:
   This sounds like behavior change. Do we have document it at `RawReader`?



-- 
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 #3718: Deprecate old JSON reader (#3610)

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


##########
parquet/src/arrow/arrow_writer/levels.rs:
##########
@@ -1121,7 +1121,7 @@ mod tests {
         // Note: we are using the JSON Arrow reader for brevity
         let json_content = r#"
         {"stocks":{"long": "$AAA", "short": "$BBB"}}
-        {"stocks":{"long": null, "long": "$CCC", "short": null}}
+        {"stocks":{"long": "$CCC", "short": null}}

Review Comment:
   This wasn't actually valid JSON, it contained a duplicate key - the RawReader handles this differently than the old JSON reader



-- 
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 #3718: Deprecate old JSON reader (#3610)

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


##########
parquet/src/arrow/arrow_writer/levels.rs:
##########
@@ -1121,7 +1121,7 @@ mod tests {
         // Note: we are using the JSON Arrow reader for brevity
         let json_content = r#"
         {"stocks":{"long": "$AAA", "short": "$BBB"}}
-        {"stocks":{"long": null, "long": "$CCC", "short": null}}
+        {"stocks":{"long": "$CCC", "short": null}}

Review Comment:
   The prior behaviour wasn't documented on `Decoder`, so I think this is fine



-- 
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] viirya commented on a diff in pull request #3718: Deprecate old JSON reader (#3610)

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


##########
arrow-json/src/reader.rs:
##########
@@ -582,6 +582,7 @@ where
 /// [`RawDecoder`]: crate::raw::RawDecoder
 /// [#3610]: https://github.com/apache/arrow-rs/issues/3610
 #[derive(Debug)]
+#[deprecated(note = "Use RawDecoder instead")]

Review Comment:
   Still need the comment? Actually it reads unclear and seems strange to put issue link there.
   
   ```suggestion
   #[derive(Debug)]
   #[deprecated(note = "Use RawDecoder instead")]
   ```



##########
arrow-json/src/reader.rs:
##########
@@ -1604,12 +1606,15 @@ fn flatten_json_string_values(values: &[Value]) -> Vec<Option<String>> {
 /// [`RawReader`]: crate::raw::RawReader
 /// [#3610]: https://github.com/apache/arrow-rs/issues/3610

Review Comment:
   ditto.
   
   ```suggestion
   ```



-- 
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 #3718: Deprecate old JSON reader (#3610)

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


##########
arrow-json/src/reader.rs:
##########
@@ -582,6 +582,7 @@ where
 /// [`RawDecoder`]: crate::raw::RawDecoder
 /// [#3610]: https://github.com/apache/arrow-rs/issues/3610
 #[derive(Debug)]
+#[deprecated(note = "Use RawDecoder instead")]

Review Comment:
   These are link shorthand, they don't get rendered, but are used to attach links to the text above.
   
   ![image](https://user-images.githubusercontent.com/1781103/220367956-c6630641-4a44-4480-a23c-66c2c03eafa0.png)
   



-- 
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 #3718: Deprecate old JSON reader (#3610)

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


-- 
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 #3718: Deprecate old JSON reader (#3610)

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


##########
parquet/src/arrow/arrow_writer/levels.rs:
##########
@@ -1121,7 +1121,7 @@ mod tests {
         // Note: we are using the JSON Arrow reader for brevity
         let json_content = r#"
         {"stocks":{"long": "$AAA", "short": "$BBB"}}
-        {"stocks":{"long": null, "long": "$CCC", "short": null}}
+        {"stocks":{"long": "$CCC", "short": null}}

Review Comment:
   This wasn't actually valid JSON, it contained a duplicate key - the RawReader handles this differently (preserving the duplicate) than the old JSON reader which preserves only the last instance



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