| 54 | } |
| 55 | |
| 56 | void SerializationNullable::enumerateStreams( |
| 57 | EnumerateStreamsSettings & settings, |
| 58 | const StreamCallback & callback, |
| 59 | const SubstreamData & data) const |
| 60 | { |
| 61 | const auto * type_nullable = data.type ? &assert_cast<const DataTypeNullable &>(*data.type) : nullptr; |
| 62 | const auto * column_nullable = data.column ? &assert_cast<const ColumnNullable &>(*data.column) : nullptr; |
| 63 | |
| 64 | auto null_map_serialization = std::make_shared<SerializationNamed>(std::make_shared<SerializationNumber<UInt8>>(), "null", false); |
| 65 | |
| 66 | settings.path.push_back(Substream::NullMap); |
| 67 | auto null_map_data = SubstreamData(null_map_serialization) |
| 68 | .withType(type_nullable ? std::make_shared<DataTypeUInt8>() : nullptr) |
| 69 | .withColumn(column_nullable ? column_nullable->getNullMapColumnPtr() : nullptr) |
| 70 | .withSerializationInfo(data.serialization_info); |
| 71 | |
| 72 | settings.path.back().data = null_map_data; |
| 73 | callback(settings.path); |
| 74 | |
| 75 | settings.path.back() = Substream::NullableElements; |
| 76 | settings.path.back().creator = std::make_shared<SubcolumnCreator>(null_map_data.column); |
| 77 | settings.path.back().data = data; |
| 78 | |
| 79 | auto next_data = SubstreamData(nested) |
| 80 | .withType(type_nullable ? type_nullable->getNestedType() : nullptr) |
| 81 | .withColumn(column_nullable ? column_nullable->getNestedColumnPtr() : nullptr) |
| 82 | .withSerializationInfo(data.serialization_info); |
| 83 | |
| 84 | nested->enumerateStreams(settings, callback, next_data); |
| 85 | settings.path.pop_back(); |
| 86 | } |
| 87 | |
| 88 | void SerializationNullable::serializeBinaryBulkStatePrefix( |
| 89 | const IColumn & column, |
nothing calls this directly
no test coverage detected