Update FunctionsJSON.h

This commit is contained in:
alexey-milovidov 2019-12-08 23:48:34 +03:00 committed by GitHub
parent 8ea7cab7e4
commit 21a7a53491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1106,15 +1106,15 @@ public:
return false;
}
ColumnArray & col_res = assert_cast<ColumnArray &>(dest);
Iterator it2 = it;
Iterator array_it = it;
size_t size = 0;
if (JSONParser::firstArrayElement(it2))
if (JSONParser::firstArrayElement(array_it))
{
do
{
JSONExtractRawImpl<JSONParser>::addValueToColumn(col_res.getData(), it2);
size++;
} while (JSONParser::nextArrayElement(it2));
JSONExtractRawImpl<JSONParser>::addValueToColumn(col_res.getData(), array_it);
++size;
} while (JSONParser::nextArrayElement(array_it));
}
col_res.getOffsets().push_back(col_res.getOffsets().back() + size);