Replace typeid_cast() with checkAndGetColumnConst()

... syntactic sugar
This commit is contained in:
Robert Schulze 2022-07-06 14:30:21 +00:00
parent 0c4da85e75
commit 6a907b23fb
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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());