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/04/13 13:02:52 UTC
[GitHub] [arrow-rs] alamb opened a new pull request, #1559: Improve JSON reader documentation
alamb opened a new pull request, #1559:
URL: https://github.com/apache/arrow-rs/pull/1559
# Which issue does this PR close?
re #1538
# Rationale for this change
I found @tustvold 's comment helpful https://github.com/apache/arrow-rs/pull/1539#pullrequestreview-939990412 and it wasn't 100% clear to me previously why there was a split between `Decoder` and `Reader`. While it was fresh on my mind, I tried to update the doc strings to encode this knowledge for the future
# What changes are included in this PR?
Improve doc comments
# Are there any user-facing changes?
Better (hopefully) doc strings
--
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] alamb merged pull request #1559: Improve JSON reader documentation
Posted by GitBox <gi...@apache.org>.
alamb merged PR #1559:
URL: https://github.com/apache/arrow-rs/pull/1559
--
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 #1559: Improve JSON reader documentation
Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #1559:
URL: https://github.com/apache/arrow-rs/pull/1559#discussion_r849484468
##########
arrow/src/json/reader.rs:
##########
@@ -555,8 +555,11 @@ where
generate_schema(field_types)
}
-/// JSON values to Arrow record batch decoder. Decoder's next_batch method takes a JSON Value
-/// iterator as input and outputs Arrow record batch.
+/// JSON values to Arrow record batch decoder.
+///
+/// A [Decoder] decodes arbitrary streams of [serde_json::Value]s and
+/// converts them to [RecordBatch]es. To decode JSON formatted files,
+/// see [Reader].
Review Comment:
```suggestion
/// JSON values to Arrow record batch decoder.
///
/// A [`Decoder`] decodes arbitrary streams of [`serde_json::Value`]s and
/// converts them to [`RecordBatch`]es. To decode JSON formatted files,
/// see [`Reader`].
```
##########
arrow/src/json/reader.rs:
##########
@@ -664,7 +668,10 @@ impl Decoder {
}
}
- /// Read the next batch of records
+ /// Read the next batch of [serde_json::Value] records from the
+ /// interator into a [RecordBatch].
Review Comment:
```suggestion
/// Read the next batch of [`serde_json::Value`] records from the
/// interator into a [`RecordBatch`].
```
##########
arrow/src/json/reader.rs:
##########
@@ -635,8 +638,9 @@ impl DecoderOptions {
}
impl Decoder {
- /// Create a new JSON decoder from any value that implements the `Iterator<Item=Result<Value>>`
- /// trait.
+ /// Create a new JSON decoder from some value that implements an
+ /// iterator over [serde_json::Value]s (aka implements the
Review Comment:
```suggestion
/// iterator over [`serde_json::Value`]s (aka implements the
```
--
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] codecov-commenter commented on pull request #1559: Improve JSON reader documentation
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1559:
URL: https://github.com/apache/arrow-rs/pull/1559#issuecomment-1098134041
# [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1559](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9b43297) into [master](https://codecov.io/gh/apache/arrow-rs/commit/228ee36eeec26867a951c6a381e3e129765e21cf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (228ee36) will **decrease** coverage by `0.00%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #1559 +/- ##
==========================================
- Coverage 82.84% 82.84% -0.01%
==========================================
Files 190 190
Lines 54985 54985
==========================================
- Hits 45551 45550 -1
- Misses 9434 9435 +1
```
| [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [arrow/src/json/reader.rs](https://codecov.io/gh/apache/arrow-rs/pull/1559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2pzb24vcmVhZGVyLnJz) | `84.48% <ø> (ø)` | |
| [parquet\_derive/src/parquet\_field.rs](https://codecov.io/gh/apache/arrow-rs/pull/1559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldF9kZXJpdmUvc3JjL3BhcnF1ZXRfZmllbGQucnM=) | `65.98% <0.00%> (-0.23%)` | :arrow_down: |
| [arrow/src/array/transform/mod.rs](https://codecov.io/gh/apache/arrow-rs/pull/1559/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2FycmF5L3RyYW5zZm9ybS9tb2QucnM=) | `86.46% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [228ee36...9b43297](https://codecov.io/gh/apache/arrow-rs/pull/1559?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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] alamb commented on pull request #1559: Improve JSON reader documentation
Posted by GitBox <gi...@apache.org>.
alamb commented on PR #1559:
URL: https://github.com/apache/arrow-rs/pull/1559#issuecomment-1098102783
> I think you need [``] for the doc link to work correctly
They worked fine for me locally without ``:
![Screen Shot 2022-04-13 at 10 12 38 AM](https://user-images.githubusercontent.com/490673/163200095-b445ae02-b25e-4f8e-af26-559c5abfaf27.png)
Putting them in back ticks does make them look nicer
![Screen Shot 2022-04-13 at 10 13 02 AM](https://user-images.githubusercontent.com/490673/163200178-e9ae33de-0a87-48ce-839c-b1ac22b2158f.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 commented on pull request #1559: Improve JSON reader documentation
Posted by GitBox <gi...@apache.org>.
tustvold commented on PR #1559:
URL: https://github.com/apache/arrow-rs/pull/1559#issuecomment-1098104176
TIL, I had always assumed you needed both as that is all I'd ever seen :sweat_smile:
--
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