Fix bug in tuple as array serialization in BSONEachRow format

This commit is contained in:
avogar 2023-03-17 17:57:56 +00:00
parent 6a653060ff
commit facb978830
3 changed files with 3 additions and 1 deletions

View File

@ -463,7 +463,7 @@ void BSONEachRowRowOutputFormat::serializeField(const IColumn & column, const Da
writeBSONSize(document_size, out);
for (size_t i = 0; i < nested_columns.size(); ++i)
serializeField(*nested_columns[i], nested_types[i], row_num, toValidUTF8String(nested_names[i]));
serializeField(*nested_columns[i], nested_types[i], row_num, have_explicit_names ? toValidUTF8String(nested_names[i]) : std::to_string(i));
writeChar(BSON_DOCUMENT_END, out);
break;

View File

@ -0,0 +1,2 @@
select tuple(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) as x format BSONEachRow;