MCPcopy Create free account
hub / github.com/apache/datafusion / nested_table_scan

Function nested_table_scan

datafusion/expr/src/logical_plan/builder.rs:2767–2796  ·  view source on GitHub ↗
(table_name: &str)

Source from the content-addressed store, hash-verified

2765 }
2766
2767 fn nested_table_scan(table_name: &str) -> Result<LogicalPlanBuilder> {
2768 // Create a schema with a scalar field, a list of strings, a list of structs
2769 // and a singular struct
2770 let struct_field_in_list = Field::new_struct(
2771 "item",
2772 vec![
2773 Field::new("a", DataType::UInt32, false),
2774 Field::new("b", DataType::UInt32, false),
2775 ],
2776 false,
2777 );
2778 let string_field = Field::new_list_field(DataType::Utf8, false);
2779 let strings_field = Field::new_list("item", string_field.clone(), false);
2780 let schema = Schema::new(vec![
2781 Field::new("scalar", DataType::UInt32, false),
2782 Field::new_list("strings", string_field, false),
2783 Field::new_list("structs", struct_field_in_list, false),
2784 Field::new(
2785 "struct_singular",
2786 DataType::Struct(Fields::from(vec![
2787 Field::new("a", DataType::UInt32, false),
2788 Field::new("b", DataType::UInt32, false),
2789 ])),
2790 false,
2791 ),
2792 Field::new_list("stringss", strings_field, false),
2793 ]);
2794
2795 table_scan(Some(table_name), &schema, None)
2796 }
2797
2798 #[test]
2799 fn test_union_after_join() -> Result<()> {

Callers 1

plan_builder_unnestFunction · 0.85

Calls 3

newFunction · 0.85
table_scanFunction · 0.85
cloneMethod · 0.45

Tested by 1

plan_builder_unnestFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…