| 69 | } |
| 70 | |
| 71 | ISerialization::KindStack ISerialization::getKindStack(const IColumn & column) |
| 72 | { |
| 73 | if (const auto * column_sparse = typeid_cast<const ColumnSparse *>(&column)) |
| 74 | { |
| 75 | auto kind_stack = getKindStack(*column_sparse->getValuesPtr()); |
| 76 | kind_stack.push_back(Kind::SPARSE); |
| 77 | return kind_stack; |
| 78 | } |
| 79 | |
| 80 | if (const auto * column_replicated = typeid_cast<const ColumnReplicated *>(&column)) |
| 81 | { |
| 82 | auto kind_stack = getKindStack(*column_replicated->getNestedColumn()); |
| 83 | kind_stack.push_back(Kind::REPLICATED); |
| 84 | return kind_stack; |
| 85 | } |
| 86 | |
| 87 | if (const auto * column_blob = typeid_cast<const ColumnBLOB *>(&column)) |
| 88 | { |
| 89 | auto kind_stack = getKindStack(*column_blob->getWrappedColumn()); |
| 90 | kind_stack.push_back(Kind::DETACHED); |
| 91 | return kind_stack; |
| 92 | } |
| 93 | |
| 94 | return {Kind::DEFAULT}; |
| 95 | } |
| 96 | |
| 97 | static String kindToString(ISerialization::Kind kind) |
| 98 | { |