github-actions[bot] commented on code in PR #70501:
URL: https://github.com/apache/doris/pull/70501#discussion_r4547694554
##########
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java:
##########
@@ -6843,7 +6857,17 @@ public static boolean enableStrictCast() {
}
}
+ // The default_variant_* variables only drive the tests, which run with
debug points enabled. Users state VARIANT
+ // properties in the column definition, so a DDL text creates the same
column in every session.
+ public void checkDefaultVariantSettable(String value) {
+ if (!Config.enable_debug_points) {
+ throw new UnsupportedOperationException("default_variant_* session
variables are only for testing, "
Review Comment:
[P2] Keep internal resets outside the test-only SET guard
A pre-upgrade `SET GLOBAL default_variant_enable_doc_mode=true` survives
image loading because `VariableMgr.read -> SessionVariable.readFromJson`
assigns fields directly; new sessions clone that value even with debug points
disabled. `UNSET SESSION VARIABLE ALL` then calls this checker through
`setAllVarsToDefaultValue -> setVarInternal -> setValue` while resetting it to
`false`. The exception aborts the reset loop, so this ordinary session-reset
command fails after upgrade and can leave other settings partly restored. The
new journal-replay test does not cover image loading.
The same unconditional rejection also affects `revertSessionValue`: a failed
`SET_VAR` records the hidden variable's original value before validation, and
attempting to restore that value fails here again, potentially preventing
restoration of other hints. Keep the user-facing SET restriction while allowing
internal restoration, or normalize legacy image values and avoid retaining
failed hint mutations; cover image-load/UNSET ALL and rejected multi-variable
SET_VAR cleanup.
--
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]