From 4857a6b25a2bd38fb3f6794d3388c0941fa80913 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Wed, 26 Feb 2025 13:20:15 +0800 Subject: [PATCH] fix Signed-off-by: Lloyd-Pottiger --- dbms/src/Debug/MockStorage.cpp | 4 ++-- dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp | 2 +- dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h | 2 +- dbms/src/Flash/Coprocessor/InterpreterUtils.cpp | 4 ++-- dbms/src/Storages/DeltaMerge/Filter/PushDownExecutor.cpp | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dbms/src/Debug/MockStorage.cpp b/dbms/src/Debug/MockStorage.cpp index 98d448b8822..040558e0832 100644 --- a/dbms/src/Debug/MockStorage.cpp +++ b/dbms/src/Debug/MockStorage.cpp @@ -212,7 +212,7 @@ BlockInputStreamPtr MockStorage::getStreamFromDeltaMerge( rf_max_wait_time_ms, context.getTimezoneInfo()); auto [before_where, filter_column_name, project_after_where] - = analyzer->buildPushDownExecutor(filter_conditions->conditions); + = analyzer->buildPushDownFilter(filter_conditions->conditions, true); BlockInputStreams ins = storage->read( column_names, query_info, @@ -274,7 +274,7 @@ void MockStorage::buildExecFromDeltaMerge( rf_max_wait_time_ms, context.getTimezoneInfo()); // Not using `auto [before_where, filter_column_name, project_after_where]` just to make the compiler happy. - auto build_ret = analyzer->buildPushDownExecutor(filter_conditions->conditions); + auto build_ret = analyzer->buildPushDownFilter(filter_conditions->conditions, true); storage->read( exec_context_, group_builder, diff --git a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp index 47b87e8ceb9..e5a10481b0a 100644 --- a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp +++ b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.cpp @@ -1032,7 +1032,7 @@ String DAGExpressionAnalyzer::buildFilterColumn( return filter_column_name; } -std::tuple DAGExpressionAnalyzer::buildPushDownExecutor( +std::tuple DAGExpressionAnalyzer::buildPushDownFilter( const google::protobuf::RepeatedPtrField & conditions, bool null_as_false) { diff --git a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h index d6d509720dc..22251ae853c 100644 --- a/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h +++ b/dbms/src/Flash/Coprocessor/DAGExpressionAnalyzer.h @@ -148,7 +148,7 @@ class DAGExpressionAnalyzer : private boost::noncopyable const google::protobuf::RepeatedPtrField & conditions, bool null_as_false = false); - std::tuple buildPushDownExecutor( + std::tuple buildPushDownFilter( const google::protobuf::RepeatedPtrField & conditions, bool null_as_false = false); diff --git a/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp b/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp index 993c560f10c..91a7ca5db9b 100644 --- a/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp +++ b/dbms/src/Flash/Coprocessor/InterpreterUtils.cpp @@ -443,7 +443,7 @@ void executePushedDownFilter( DAGPipeline & pipeline) { auto [before_where, filter_column_name, project_after_where] - = analyzer.buildPushDownExecutor(filter_conditions.conditions, true); + = analyzer.buildPushDownFilter(filter_conditions.conditions, true); for (auto & stream : pipeline.streams) { @@ -464,7 +464,7 @@ void executePushedDownFilter( LoggerPtr log) { auto [before_where, filter_column_name, project_after_where] - = analyzer.buildPushDownExecutor(filter_conditions.conditions, true); + = analyzer.buildPushDownFilter(filter_conditions.conditions, true); auto input_header = group_builder.getCurrentHeader(); for (size_t i = 0; i < group_builder.concurrency(); ++i) diff --git a/dbms/src/Storages/DeltaMerge/Filter/PushDownExecutor.cpp b/dbms/src/Storages/DeltaMerge/Filter/PushDownExecutor.cpp index 006dcb8ddf8..76ecdce9d21 100644 --- a/dbms/src/Storages/DeltaMerge/Filter/PushDownExecutor.cpp +++ b/dbms/src/Storages/DeltaMerge/Filter/PushDownExecutor.cpp @@ -136,7 +136,8 @@ PushDownExecutorPtr PushDownExecutor::build( } // build filter expression actions - auto [before_where, filter_column_name, project_after_where] = analyzer->buildPushDownExecutor(pushed_down_filters); + auto [before_where, filter_column_name, project_after_where] + = analyzer->buildPushDownFilter(pushed_down_filters, true); LOG_DEBUG(tracing_logger, "Push down filter: {}", before_where->dumpActions()); // record current column defines