[opt](spill) add session variable of 'enable_force_spill' (#34664) (#35561)

## Proposed changes

pick #34664

<!--Describe your changes.-->
This commit is contained in:
TengJianPing
2024-05-29 09:57:31 +08:00
committed by GitHub
parent 95393b531d
commit b06794d619
6 changed files with 261 additions and 4 deletions

View File

@ -501,6 +501,7 @@ public class SessionVariable implements Serializable, Writable {
public static final String ENABLE_JOIN_SPILL = "enable_join_spill";
public static final String ENABLE_SORT_SPILL = "enable_sort_spill";
public static final String ENABLE_AGG_SPILL = "enable_agg_spill";
public static final String ENABLE_FORCE_SPILL = "enable_force_spill";
public static final String DATA_QUEUE_MAX_BLOCKS = "data_queue_max_blocks";
public static final String GENERATE_STATS_FACTOR = "generate_stats_factor";
@ -1802,6 +1803,15 @@ public class SessionVariable implements Serializable, Writable {
needForward = true, fuzzy = true)
public boolean enableAggSpill = false;
@VariableMgr.VarAttr(
name = ENABLE_FORCE_SPILL,
description = {"控制是否开启强制落盘(即使在内存足够的情况),默认为 false。",
"Controls whether enable force spill."
},
needForward = true, fuzzy = true
)
public boolean enableForceSpill = false;
@VariableMgr.VarAttr(
name = DATA_QUEUE_MAX_BLOCKS,
description = {"DataQueue 中每个子队列允许最大的 block 个数",
@ -1985,7 +1995,7 @@ public class SessionVariable implements Serializable, Writable {
this.minRevocableMem = 1024 * 1024;
break;
default:
this.minRevocableMem = 100 * 1024 * 1024 * 1024;
this.minRevocableMem = 100L * 1024 * 1024 * 1024;
break;
}
} else {
@ -3263,6 +3273,7 @@ public class SessionVariable implements Serializable, Writable {
tResult.setEnableJoinSpill(enableJoinSpill);
tResult.setEnableSortSpill(enableSortSpill);
tResult.setEnableAggSpill(enableAggSpill);
tResult.setEnableForceSpill(enableForceSpill);
tResult.setMinRevocableMem(minRevocableMem);
tResult.setDataQueueMaxBlocks(dataQueueMaxBlocks);