This is an automated email from the ASF dual-hosted git repository.

zhangzc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new d3e4f2e4d [GLUTEN-5083][CH] Invalid result with 
mergeTwoPhasesHashBaseAggregateIfNeed enable (#5137)
d3e4f2e4d is described below

commit d3e4f2e4dea31b8f19e1cf86772cf34c1688d364
Author: lgbo <lgbo.u...@gmail.com>
AuthorDate: Wed Mar 27 11:15:26 2024 +0800

    [GLUTEN-5083][CH] Invalid result with mergeTwoPhasesHashBaseAggregateIfNeed 
enable (#5137)
    
    [CH] Invalid result with mergeTwoPhasesHashBaseAggregateIfNeed enable
---
 cpp-ch/local-engine/Operator/GraceMergingAggregatedStep.cpp | 4 ++++
 cpp-ch/local-engine/Operator/StreamingAggregatingStep.cpp   | 4 ++++
 cpp-ch/local-engine/Parser/AggregateRelParser.cpp           | 2 +-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/cpp-ch/local-engine/Operator/GraceMergingAggregatedStep.cpp 
b/cpp-ch/local-engine/Operator/GraceMergingAggregatedStep.cpp
index 9294d9719..00d2e3116 100644
--- a/cpp-ch/local-engine/Operator/GraceMergingAggregatedStep.cpp
+++ b/cpp-ch/local-engine/Operator/GraceMergingAggregatedStep.cpp
@@ -67,6 +67,10 @@ GraceMergingAggregatedStep::GraceMergingAggregatedStep(
 
 void GraceMergingAggregatedStep::transformPipeline(DB::QueryPipelineBuilder & 
pipeline, const DB::BuildQueryPipelineSettings &)
 {
+    if (params.max_bytes_before_external_group_by)
+    {
+        throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, 
"max_bytes_before_external_group_by is not supported in 
GraceMergingAggregatedStep");
+    }
     auto num_streams = pipeline.getNumStreams();
     auto transform_params = 
std::make_shared<DB::AggregatingTransformParams>(pipeline.getHeader(), params, 
true);
     pipeline.resize(1);
diff --git a/cpp-ch/local-engine/Operator/StreamingAggregatingStep.cpp 
b/cpp-ch/local-engine/Operator/StreamingAggregatingStep.cpp
index ff81ee294..698d353b1 100644
--- a/cpp-ch/local-engine/Operator/StreamingAggregatingStep.cpp
+++ b/cpp-ch/local-engine/Operator/StreamingAggregatingStep.cpp
@@ -286,6 +286,10 @@ StreamingAggregatingStep::StreamingAggregatingStep(
 
 void StreamingAggregatingStep::transformPipeline(DB::QueryPipelineBuilder & 
pipeline, const DB::BuildQueryPipelineSettings &)
 {
+    if (params.max_bytes_before_external_group_by)
+    {
+        throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, 
"max_bytes_before_external_group_by is not supported in 
StreamingAggregatingStep");
+    }
     pipeline.dropTotalsAndExtremes();
     auto transform_params = 
std::make_shared<DB::AggregatingTransformParams>(pipeline.getHeader(), params, 
false);
     pipeline.resize(1);
diff --git a/cpp-ch/local-engine/Parser/AggregateRelParser.cpp 
b/cpp-ch/local-engine/Parser/AggregateRelParser.cpp
index 02248d74a..a3ab329f0 100644
--- a/cpp-ch/local-engine/Parser/AggregateRelParser.cpp
+++ b/cpp-ch/local-engine/Parser/AggregateRelParser.cpp
@@ -310,7 +310,7 @@ void AggregateRelParser::addCompleteModeAggregatedStep()
             settings.group_by_overflow_mode,
             settings.group_by_two_level_threshold,
             settings.group_by_two_level_threshold_bytes,
-            settings.max_bytes_before_external_group_by,
+            0, /*settings.max_bytes_before_external_group_by*/
             settings.empty_result_for_aggregation_by_empty_set,
             getContext()->getTempDataOnDisk(),
             settings.max_threads,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@gluten.apache.org
For additional commands, e-mail: commits-h...@gluten.apache.org

Reply via email to