Jefffrey commented on code in PR #6643:
URL: https://github.com/apache/arrow-rs/pull/6643#discussion_r1923563899
##########
arrow-json/src/reader/mod.rs:
##########
@@ -2343,4 +2367,294 @@ mod tests {
.unwrap()
);
}
+
+ // Parse the given `row` in `struct_mode` as a type given by fields.
+ //
+ // If as_struct == true, wrap the fields in a Struct field with name "r".
+ // If as_struct == false, wrap the fields in a Schema.
+ fn _parse_structs(
+ row: &str,
+ struct_mode: StructMode,
+ fields: Fields,
+ as_struct: bool,
+ ) -> Result<RecordBatch, ArrowError> {
+ /*
+
+ let builder = if as_field {
+ ReaderBuilder::new_with_field(Field::new("r",
DataType::Struct(fields), true))
+ } else {
+ ReaderBuilder::new(Arc::new(Schema::new(fields)))
+ };
+
+ let schema = Arc::new(Schema::new(vec![Field::new(
+ "a",
+ DataType::Struct(struct_fields),
+ true,
+ )]));
+ ReaderBuilder::new(schema.clone())
+
+ let int_field = Field::new("a", DataType::Int32, true);
+ let struct_field = Field::new(
+ "r",
+ DataType::Struct(Fields::from(vec![int_field.clone()])),
+ true,
+ );
+ let builder = if as_field {
+ ReaderBuilder::new_with_field(field.clone())
+ } else {
+ ReaderBuilder::new(Arc::new(Schema::new(vec![field].clone())))
+ };
+
+
+ */
Review Comment:
I think this is some accidentally leftover code?
--
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]