hello-stephen commented on code in PR #70976:
URL: https://github.com/apache/doris/pull/70976#discussion_r4737570104
##########
fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java:
##########
@@ -483,6 +489,19 @@ private static void setVarInternal(SessionVariable
sessionVariable, SetVar setVa
}
}
+ // Check before changing the session, the global value, or its edit
log. For example,
+ // a cache-block limit of -1 would become a huge unsigned bound in BE.
+ try {
+ NumericRange.check(attr.name(), value, attr.minValue(),
attr.maxValue());
Review Comment:
[P2] Update the retained spill contract tests for negative rejection
This gate now rejects negative spill inputs before
`normalizeIntValue`/`normalizeLongValue`, but the unchanged
`SessionVariableSpillContractTest` still expects them to succeed. For each of
its six ranges, `setStoresAndForwardsEffectiveValue` sets `-1`,
`historicalReadPathsAndHintRestoration` forwards raw `-1`, and
`invalidNumbersStillFailWithoutChangingValue` sets
`Integer.MIN_VALUE`/`Long.MIN_VALUE` without expecting an exception. Those 18
parameterized executions now throw under the new validation. Update the
SET/forwarding cases to assert rejection and unchanged values, while preserving
the historical JSON/map normalization checks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]