mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 06:32:08 +00:00
fix tests
This commit is contained in:
parent
3ff89a4e29
commit
71bf39c69c
@ -96,11 +96,13 @@ Block StorageSnapshot::getSampleBlockForColumns(const Names & column_names) cons
|
||||
for (const auto & name : column_names)
|
||||
{
|
||||
auto column = columns.tryGetColumnOrSubcolumn(GetColumnsOptions::All, name);
|
||||
if (column && !isObject(column->type))
|
||||
auto object_column = object_columns.tryGetColumnOrSubcolumn(GetColumnsOptions::All, name);
|
||||
|
||||
if (column && !object_column)
|
||||
{
|
||||
res.insert({column->type->createColumn(), column->type, column->name});
|
||||
}
|
||||
else if (auto object_column = object_columns.tryGetColumnOrSubcolumn(GetColumnsOptions::All, name))
|
||||
else if (object_column)
|
||||
{
|
||||
res.insert({object_column->type->createColumn(), object_column->type, object_column->name});
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
1 10 a
|
||||
Tuple(a UInt32, s String)
|
||||
Tuple(a UInt8, s String)
|
||||
1 10 a 0
|
||||
2 sss b 300
|
||||
3 20 c 0
|
||||
Tuple(a String, b UInt64, s String)
|
||||
Tuple(a String, b UInt16, s String)
|
||||
1 10 a 0
|
||||
2 sss b 300
|
||||
3 20 c 0
|
||||
4 30 400
|
||||
5 0 qqq 0 foo
|
||||
Tuple(a String, b UInt64, s String, t String)
|
||||
Tuple(a String, b UInt16, s String, t String)
|
||||
|
Loading…
Reference in New Issue
Block a user