-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement push down instr function to tiflash #6081
base: master
Are you sure you want to change the base?
Conversation
Merge from pingcap repo
Merge from pingcap repo
Signed-off-by: lizhenhuan <1916038084@qq.com>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-all-tests |
Signed-off-by: lizhenhuan <1916038084@qq.com>
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-all-tests |
/run-all-tests |
/run-all-tests |
2 similar comments
/run-all-tests |
/run-all-tests |
/run-build |
1 similar comment
/run-build |
/run-integration-test |
/build |
/run-all-tests |
LGTM |
/run-all-tests |
Signed-off-by: lizhenhuan <1916038084@qq.com>
/run-all-tests |
/run-all-tests |
const auto * substr_const_string = checkAndGetColumnConst<ColumnString>(c1_col_column.get()); | ||
if (!substr_const_string) | ||
{ | ||
const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get()); | ||
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | ||
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto * substr_const_string = checkAndGetColumnConst<ColumnString>(c1_col_column.get()); | |
if (!substr_const_string) | |
{ | |
const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get()); | |
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | |
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | |
} | |
if (const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get())) | |
{ | |
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | |
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | |
} | |
else | |
throw Exception( | |
fmt::format("Illegal column {} of argument of function {}", c1_col_column->getName(), getName()), | |
ErrorCodes::ILLEGAL_COLUMN); |
const auto * substr_const_string = checkAndGetColumnConst<ColumnString>(c1_col_column.get()); | ||
if (!substr_const_string) | ||
{ | ||
const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get()); | ||
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | ||
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto * substr_const_string = checkAndGetColumnConst<ColumnString>(c1_col_column.get()); | |
if (!substr_const_string) | |
{ | |
const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get()); | |
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | |
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | |
} | |
if (const auto * substr_vector_string = checkAndGetColumn<ColumnString>(c1_col_column.get())) | |
{ | |
const auto * str_const_string_value = checkAndGetColumn<ColumnString>(str_const_string->getDataColumnPtr().get()); | |
constVector(str_const_string_value->getChars(), str_const_string_value->getOffsets(), substr_vector_string->getChars(), substr_vector_string->getOffsets(), val_num, res_vec); | |
} | |
else | |
throw Exception( | |
fmt::format("Illegal column {} of argument of function {}", c1_col_column->getName(), getName()), | |
ErrorCodes::ILLEGAL_COLUMN); |
} | ||
|
||
private: | ||
static Int64 find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can use Volnitsky directly.
#include <Common/Volnitsky.h>
Ref
tiflash/dbms/src/Functions/FunctionsString.cpp
Line 4635 in 10ebe6b
class FunctionSubStringIndex : public IFunction |
What problem does this PR solve?
Issue Number: close #5109
Related PR:pingcap/tidb#35753
Problem Summary:Implement instr function push down to tiflash
Related PR:pingcap/tidb#38309
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note