ArrayJoin support Array, Nullable(Array) and Map type
| 24 | |
| 25 | //ArrayJoin support Array, Nullable(Array) and Map type |
| 26 | std::shared_ptr<const DataTypeArray> getArrayJoinDataType(DataTypePtr type) |
| 27 | { |
| 28 | using DataTypeArrayPtr = std::shared_ptr<const DataTypeArray>; |
| 29 | // we don't assume what inside Nullable is always Array |
| 30 | if (const auto * nullable_type = typeid_cast<const DataTypeNullable *>(type.get())) |
| 31 | type = nullable_type->getNestedType(); |
| 32 | |
| 33 | if (auto array_type_ptr = typeid_cast<DataTypeArrayPtr>(type)) |
| 34 | return array_type_ptr; |
| 35 | else if (const auto * map_type = typeid_cast<const DataTypeMap *>(type.get())) |
| 36 | return typeid_cast<DataTypeArrayPtr>(map_type->getNestedType()); |
| 37 | |
| 38 | return nullptr; |
| 39 | } |
| 40 | |
| 41 | ColumnPtr getArrayJoinColumn(ColumnPtr column) |
| 42 | { |
no test coverage detected