|
24 | 24 | #include <tuple> |
25 | 25 | #include <vector> |
26 | 26 |
|
27 | | -#include <sparrow/builder/builder.hpp> |
| 27 | +// #include <sparrow/builder/builder.hpp> |
28 | 28 |
|
29 | 29 | namespace iceberg::internal { |
30 | 30 |
|
@@ -76,24 +76,24 @@ std::pair<ArrowSchema, ArrowArray> CreateExampleArrowSchemaAndArrayByNanoarrow() |
76 | 76 | return {out_schema, out_array}; |
77 | 77 | } |
78 | 78 |
|
79 | | -std::pair<ArrowSchema, ArrowArray> CreateExampleArrowSchemaAndArrayBySparrow() { |
80 | | - using struct_type = std::tuple<int64_t, sparrow::nullable<std::string>>; |
81 | | - std::vector<struct_type> values = { |
82 | | - {1, "a"}, |
83 | | - {2, "b"}, |
84 | | - {3, "c"}, |
85 | | - }; |
86 | | - auto sparrow_array = sparrow::build(values); |
87 | | - |
88 | | - // Demonstrate the use of arrow_proxy to modify the schema |
89 | | - auto [_, non_owning_schema] = sparrow::get_arrow_structures(sparrow_array); |
90 | | - non_owning_schema->children[0]->name = "id"; |
91 | | - non_owning_schema->children[0]->flags &= ~ARROW_FLAG_NULLABLE; |
92 | | - non_owning_schema->children[1]->name = "name"; |
93 | | - non_owning_schema->children[1]->flags |= ARROW_FLAG_NULLABLE; |
94 | | - |
95 | | - auto [array, schema] = sparrow::extract_arrow_structures(std::move(sparrow_array)); |
96 | | - return {schema, array}; |
97 | | -} |
| 79 | +// std::pair<ArrowSchema, ArrowArray> CreateExampleArrowSchemaAndArrayBySparrow() { |
| 80 | +// using struct_type = std::tuple<int64_t, sparrow::nullable<std::string>>; |
| 81 | +// std::vector<struct_type> values = { |
| 82 | +// {1, "a"}, |
| 83 | +// {2, "b"}, |
| 84 | +// {3, "c"}, |
| 85 | +// }; |
| 86 | +// auto sparrow_array = sparrow::build(values); |
| 87 | + |
| 88 | +// // Demonstrate the use of arrow_proxy to modify the schema |
| 89 | +// auto [_, non_owning_schema] = sparrow::get_arrow_structures(sparrow_array); |
| 90 | +// non_owning_schema->children[0]->name = "id"; |
| 91 | +// non_owning_schema->children[0]->flags &= ~ARROW_FLAG_NULLABLE; |
| 92 | +// non_owning_schema->children[1]->name = "name"; |
| 93 | +// non_owning_schema->children[1]->flags |= ARROW_FLAG_NULLABLE; |
| 94 | + |
| 95 | +// auto [array, schema] = sparrow::extract_arrow_structures(std::move(sparrow_array)); |
| 96 | +// return {schema, array}; |
| 97 | +// } |
98 | 98 |
|
99 | 99 | } // namespace iceberg::internal |
0 commit comments