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