This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5a463fedb8 [optimize](match) optimize unnecessary conversions (#24389)
5a463fedb8 is described below
commit 5a463fedb84791b913c71c82a4772b23047fb5b9
Author: zzzxl <[email protected]>
AuthorDate: Thu Sep 21 15:29:10 2023 +0800
[optimize](match) optimize unnecessary conversions (#24389)
---
be/src/vec/functions/match.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/functions/match.cpp b/be/src/vec/functions/match.cpp
index bba640fa9f..a549762c7d 100644
--- a/be/src/vec/functions/match.cpp
+++ b/be/src/vec/functions/match.cpp
@@ -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;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]