| 1449 | static constexpr int kInvalidChildId = -1; |
| 1450 | |
| 1451 | static Result<std::shared_ptr<DataType>> Make( |
| 1452 | const FieldVector& fields, const std::vector<int8_t>& type_codes, |
| 1453 | UnionMode::type mode = UnionMode::SPARSE) { |
| 1454 | if (mode == UnionMode::SPARSE) { |
| 1455 | return sparse_union(fields, type_codes); |
| 1456 | } else { |
| 1457 | return dense_union(fields, type_codes); |
| 1458 | } |
| 1459 | } |
| 1460 | |
| 1461 | DataTypeLayout layout() const override; |
| 1462 |