Update src/Formats/SchemaInferenceUtils.cpp

Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
This commit is contained in:
Shaun Struwig 2024-06-11 13:32:34 +02:00 committed by GitHub
parent 548c909010
commit bad5e27bbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1539,9 +1539,7 @@ DataTypePtr makeNullableRecursively(DataTypePtr type)
DataTypes nested_types;
for (const auto & nested_type: variant_type->getVariants())
{
auto is_low_cardinality = nested_type->lowCardinality();
auto has_sub_types = nested_type->haveSubtypes();
if (!is_low_cardinality && has_sub_types)
if (!nested_type->lowCardinality() && nested_type->haveSubtypes())
nested_types.push_back(makeNullableRecursively(nested_type));
else
nested_types.push_back(nested_type);