yourenawo commented on code in PR #3399:
URL: https://github.com/apache/arrow-rs/pull/3399#discussion_r1068158112


##########
arrow-json/src/reader.rs:
##########
@@ -677,17 +689,29 @@ impl Decoder {
     ///
     /// Returns `None` if the input iterator is exhausted.
     pub fn next_batch<I>(
-        &self,
+        &mut self,
         value_iter: &mut I,
     ) -> Result<Option<RecordBatch>, ArrowError>
     where
         I: Iterator<Item = Result<Value, ArrowError>>,
     {
+        if let Some(ref s) = self.error_json {
+            let msg = s.clone();
+            self.error_json = None;
+            return Err(ArrowError::JsonError(msg));
+        }
         let batch_size = self.options.batch_size;
         let mut rows: Vec<Value> = Vec::with_capacity(batch_size);
 
         for value in value_iter.by_ref().take(batch_size) {
-            let v = value?;
+            let v = match value {
+                Ok(v) => v,
+                Err(ArrowError::JsonError(s)) => {

Review Comment:
   ok, next rows have this



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

Reply via email to