template<std::ranges::input_range R>
requires std::same_as<std::ranges::range_value_t<R>, sparrow::record_batch>
| bool sparrow_ipc::utils::check_record_batches_consistency |
( |
const R & | record_batches | ) |
|
Checks if all record batches in a collection have consistent structure.
This function verifies that all record batches in the provided collection have:
- The same number of columns
- Matching data types for corresponding columns (same column index)
- Template Parameters
-
| R | Container type that holds sparrow::record_batch objects |
- Parameters
-
| record_batches | Collection of record batches to check for consistency |
- Returns
- true if all record batches have consistent structure or if the collection is empty, false if any structural inconsistencies are found
- Note
- An empty collection is considered consistent and returns true
-
The number of rows per record batch is not required to be the same
- Examples
- /home/runner/work/sparrow-ipc/sparrow-ipc/include/sparrow_ipc/utils.hpp.
Definition at line 116 of file utils.hpp.