Review fixes

This commit is contained in:
Vitaly Orlov 2021-10-13 00:08:00 +03:00
parent 65c6605c2c
commit 4d2b34a7f0
No known key found for this signature in database
GPG Key ID: 58F48CDD37483DA0
2 changed files with 4 additions and 4 deletions

View File

@ -1378,7 +1378,7 @@ public:
auto & col_tuple = assert_cast<ColumnTuple &>(col_arr.getData());
auto & col_key = assert_cast<ColumnString &>(col_tuple.getColumn(0));
for (auto [key, value] : object)
for (const auto & [key, value] : object)
{
col_key.insertData(key.data(), key.size());
}

View File

@ -233,9 +233,9 @@ SELECT JSONExtractKeysAndValuesRaw('{"a": "hello", "b": [-100, 200.0, 300], "c":
SELECT '--JSONExtractKeys--';
SELECT JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300]}');
SELECT JSONExtractKeysAndValuesRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'b');
SELECT JSONExtractKeysAndValuesRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'a');
SELECT JSONExtractKeysAndValuesRaw('{"a": "hello", "b": [-100, 200.0, 300], "c":{"d":[121,144]}}', 'c');
SELECT JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300]}', 'b');
SELECT JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300]}', 'a');
SELECT JSONExtractKeys('{"a": "hello", "b": [-100, 200.0, 300], "c":{"d":[121,144]}}', 'c');
SELECT '--const/non-const mixed--';
SELECT JSONExtractString('["a", "b", "c", "d", "e"]', idx) FROM (SELECT arrayJoin([1,2,3,4,5]) AS idx);