Issue Number: close #xxx pick #35941 ## Proposed changes Issue Number: close #xxx <!--Describe your changes.-->
This commit is contained in:
@ -56,6 +56,7 @@ import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Field;
|
||||
import java.security.InvalidParameterException;
|
||||
import java.security.SecureRandom;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
@ -846,7 +847,7 @@ public class SessionVariable implements Serializable, Writable {
|
||||
public boolean haveQueryCache = false;
|
||||
|
||||
// 4096 minus 16 + 16 bytes padding that in padding pod array
|
||||
@VariableMgr.VarAttr(name = BATCH_SIZE, fuzzy = true)
|
||||
@VariableMgr.VarAttr(name = BATCH_SIZE, fuzzy = true, checker = "checkBatchSize")
|
||||
public int batchSize = 4064;
|
||||
|
||||
@VariableMgr.VarAttr(name = DISABLE_STREAMING_PREAGGREGATIONS, fuzzy = true)
|
||||
@ -4008,6 +4009,13 @@ public class SessionVariable implements Serializable, Writable {
|
||||
}
|
||||
}
|
||||
|
||||
public void checkBatchSize(String batchSize) {
|
||||
Long batchSizeValue = Long.valueOf(batchSize);
|
||||
if (batchSizeValue < 1 || batchSizeValue > 65535) {
|
||||
throw new InvalidParameterException("batch_size should be between 1 and 65535)");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEnableInsertGroupCommit() {
|
||||
return Config.wait_internal_group_commit_finish
|
||||
|| GroupCommitBlockSink.parseGroupCommit(groupCommit) == TGroupCommitMode.ASYNC_MODE
|
||||
|
||||
Reference in New Issue
Block a user