benibus commented on code in PR #14355:
URL: https://github.com/apache/arrow/pull/14355#discussion_r1028287082
##########
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:
Thanks! Yeah, the docs could've been a little more explicit there.
--
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]