mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Replace typeid_cast() with checkAndGetColumnConst()
... syntactic sugar
This commit is contained in:
parent
0c4da85e75
commit
6a907b23fb
@ -70,7 +70,7 @@ public:
|
||||
const ColumnPtr & needles_ptr = arguments[2].column;
|
||||
|
||||
const ColumnString * col_haystack_vector = checkAndGetColumn<ColumnString>(&*haystack_ptr);
|
||||
const ColumnConst * col_haystack_const = typeid_cast<const ColumnConst *>(&*haystack_ptr);
|
||||
const ColumnConst * col_haystack_const = checkAndGetColumnConst<ColumnString>(&*haystack_ptr);
|
||||
assert(static_cast<bool>(col_haystack_vector) ^ static_cast<bool>(col_haystack_const));
|
||||
|
||||
UInt32 edit_distance = 0;
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
const ColumnPtr & needles_ptr = arguments[1].column;
|
||||
|
||||
const ColumnString * col_haystack_vector = checkAndGetColumn<ColumnString>(&*haystack_ptr);
|
||||
const ColumnConst * col_haystack_const = typeid_cast<const ColumnConst *>(&*haystack_ptr);
|
||||
const ColumnConst * col_haystack_const = checkAndGetColumnConst<ColumnString>(&*haystack_ptr);
|
||||
assert(static_cast<bool>(col_haystack_vector) ^ static_cast<bool>(col_haystack_const));
|
||||
|
||||
const ColumnArray * col_needles = checkAndGetColumn<ColumnArray>(needles_ptr.get());
|
||||
|
Loading…
Reference in New Issue
Block a user