Returns the type that controls how the buffers of this ArrayData (not its children) should behave
| 45 | // Returns the type that controls how the buffers of this ArrayData (not its children) |
| 46 | // should behave |
| 47 | Type::type GetTypeForBuffers(const ArrayData& array) { |
| 48 | Type::type type_id = array.type->storage_id(); |
| 49 | if (type_id == Type::DICTIONARY) { |
| 50 | // return index type id, provided by the DictionaryType array.type or |
| 51 | // array.type->storage_type() if array.type is an ExtensionType |
| 52 | DataType* dict_type = array.type.get(); |
| 53 | if (array.type->id() == Type::EXTENSION) { |
| 54 | dict_type = checked_cast<ExtensionType*>(dict_type)->storage_type().get(); |
| 55 | } |
| 56 | return checked_cast<DictionaryType*>(dict_type)->index_type()->id(); |
| 57 | } |
| 58 | return type_id; |
| 59 | } |
| 60 | |
| 61 | // Checks to see if an array's own buffers are aligned but doesn't check |
| 62 | // children |
no test coverage detected