wjones127 commented on code in PR #14355:
URL: https://github.com/apache/arrow/pull/14355#discussion_r1028272228
##########
cpp/src/arrow/json/reader.h:
##########
@@ -60,5 +50,49 @@ class ARROW_EXPORT TableReader {
ARROW_EXPORT Result<std::shared_ptr<RecordBatch>> ParseOne(ParseOptions
options,
std::shared_ptr<Buffer> json);
+/// \brief A class that reads a JSON file incrementally
+///
+/// JSON data is read from a stream in fixed-size blocks (configurable with
+/// `ReadOptions::block_size`). Each block is converted to a `RecordBatch`.
Yielded
+/// batches have a consistent schema but may differ in row count.
+///
+/// The supplied `ParseOptions` are used to determine a schema on the first
non-empty
+/// block. Afterwards, the schema is frozen and unexpected fields will be
ignored on
+/// subsequent reads (unless `UnexpectedFieldBehavior::Error` was specified).
Review Comment:
> Do you mean overloads that replace ParseOptions with just a schema?
No, sorry I just misunderstood. The function docs currently imply that the
schema is always inferred and don't mention that it can be explicitly passed.
Perhaps it's worth mentioning briefly here? (I imagine it's explained in more
detail on `ParseOptions`.)
```suggestion
/// The supplied `ParseOptions` are used to determine a schema, based either
on a
/// provided explicit schema or inferred from the first non-empty block.
/// Afterwards, the schema is frozen and unexpected fields will be ignored on
/// subsequent reads (unless `UnexpectedFieldBehavior::Error` was specified).
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]