Skip to content

Commit

Permalink
[optimize](match) optimize unnecessary conversions (#24389)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzxl1993 authored Sep 21, 2023
1 parent ce57b99 commit 5a463fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion be/src/vec/functions/match.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ namespace doris::vectorized {
Status FunctionMatchBase::execute_impl(FunctionContext* context, Block& block,
const ColumnNumbers& arguments, size_t result,
size_t input_rows_count) {
auto match_query_str = block.get_by_position(arguments[1]).to_string(0);
ColumnPtr& column_ptr = block.get_by_position(arguments[1]).column;
DataTypePtr& type_ptr = block.get_by_position(arguments[1]).type;
auto match_query_str = type_ptr->to_string(*column_ptr, 0);
std::string column_name = block.get_by_position(arguments[0]).name;
auto match_pred_column_name =
BeConsts::BLOCK_TEMP_COLUMN_PREFIX + column_name + "_match_" + match_query_str;
Expand Down

0 comments on commit 5a463fe

Please sign in to comment.