viirya commented on code in PR #1736:
URL: https://github.com/apache/arrow-rs/pull/1736#discussion_r882246203
##########
arrow/src/ipc/reader.rs:
##########
@@ -1390,43 +1390,167 @@ mod tests {
});
}
- #[test]
- fn test_projection_array_values() {
- let schema = Schema::new(vec![
+ fn create_test_projection_schema() -> Schema {
+ // define field types
+ let list_data_type =
+ DataType::List(Box::new(Field::new("item", DataType::Int32,
true)));
+
+ let fixed_size_list_data_type = DataType::FixedSizeList(
+ Box::new(Field::new("item", DataType::Int32, false)),
+ 3,
+ );
+
+ let key_type = DataType::Int8;
+ let value_type = DataType::Utf8;
+ let dict_data_type =
+ DataType::Dictionary(Box::new(key_type), Box::new(value_type));
+
+ let union_fileds = vec![
+ Field::new("a", DataType::Int32, false),
+ Field::new("b", DataType::Float64, false),
+ ];
+ let union_data_type = DataType::Union(union_fileds, vec![0, 1],
UnionMode::Dense);
+
+ let struct_fields = vec![
+ Field::new("id", DataType::Int32, false),
+ Field::new(
+ "list",
+ DataType::List(Box::new(Field::new("item", DataType::Int8,
true))),
+ false,
+ ),
+ ];
+ let struct_data_type = DataType::Struct(struct_fields);
+
+ // define schema
+ Schema::new(vec![
Review Comment:
👍
--
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]