diff --git a/dbms/src/Core/OperatorSpillContext.h b/dbms/src/Core/OperatorSpillContext.h index 3f966d5eb5b..8e02ecc4f4d 100644 --- a/dbms/src/Core/OperatorSpillContext.h +++ b/dbms/src/Core/OperatorSpillContext.h @@ -48,11 +48,10 @@ class OperatorSpillContext const static Int64 MIN_SPILL_THRESHOLD = 10ULL * 1024 * 1024; OperatorSpillContext(UInt64 operator_spill_threshold_, const String op_name_, const LoggerPtr & log_) : operator_spill_threshold(operator_spill_threshold_) + , auto_spill_mode(operator_spill_threshold == 0) , op_name(op_name_) , log(log_) - { - auto_spill_mode = supportAutoTriggerSpill() && operator_spill_threshold == 0; - } + {} virtual ~OperatorSpillContext() = default; bool isSpillEnabled() const { return enable_spill && (supportAutoTriggerSpill() || operator_spill_threshold > 0); } void disableSpill() { enable_spill = false; } diff --git a/dbms/src/Interpreters/HashJoinSpillContext.cpp b/dbms/src/Interpreters/HashJoinSpillContext.cpp index a7e7a3066df..e5d59479e7d 100644 --- a/dbms/src/Interpreters/HashJoinSpillContext.cpp +++ b/dbms/src/Interpreters/HashJoinSpillContext.cpp @@ -27,7 +27,10 @@ HashJoinSpillContext::HashJoinSpillContext( , max_cached_bytes(std::max( build_spill_config.max_cached_data_bytes_in_spiller, probe_spill_config.max_cached_data_bytes_in_spiller)) -{} +{ + /// join does not support auto spill mode + auto_spill_mode = false; +} void HashJoinSpillContext::init(size_t partition_num) {