tustvold commented on code in PR #4259:
URL: https://github.com/apache/arrow-rs/pull/4259#discussion_r1200593185


##########
arrow-ipc/src/reader.rs:
##########
@@ -334,125 +205,21 @@ fn create_array(
                 .offset(0)
                 .build()
                 .unwrap();
-            node_index += 1;
             // no buffer increases
-            make_array(data)
-        }
-        _ => {
-            if nodes.len() <= node_index {
-                return Err(ArrowError::IoError(format!(
-                    "Invalid data for schema. {} refers to node index {} but 
only {} in schema",
-                    field, node_index, nodes.len()
-                )));
-            }
-            let array = create_primitive_array(
-                nodes.get(node_index),
-                data_type,
-                &[
-                    read_buffer(buffers.get(buffer_index), data, 
compression_codec)?,
-                    read_buffer(buffers.get(buffer_index + 1), data, 
compression_codec)?,
-                ],
-            )?;
-            node_index += 1;
-            buffer_index += 2;
-            array
-        }
-    };
-    Ok((array, node_index, buffer_index))
-}
-
-/// Skip fields based on data types to advance `node_index` and `buffer_index`.
-/// This function should be called when doing projection in fn 
`read_record_batch`.
-/// The advancement logic references fn `create_array`.
-fn skip_field(

Review Comment:
   This logic is moved into skip_node



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