| 903 | } |
| 904 | |
| 905 | Result<std::shared_ptr<Array>> MakeArrayFromScalar(const Scalar& scalar, int64_t length, |
| 906 | MemoryPool* pool) { |
| 907 | // Null union scalars still have a type code associated |
| 908 | if (!scalar.is_valid && !is_union(scalar.type->id())) { |
| 909 | return MakeArrayOfNull(scalar.type, length, pool); |
| 910 | } |
| 911 | return RepeatedArrayFactory(pool, scalar, length).Create(); |
| 912 | } |
| 913 | |
| 914 | Result<std::shared_ptr<Array>> MakeEmptyArray(std::shared_ptr<DataType> type, |
| 915 | MemoryPool* memory_pool) { |