Skip to content

Commit

Permalink
support select experimental session variable
Browse files Browse the repository at this point in the history
  • Loading branch information
cambyzju committed Mar 6, 2024
1 parent 207aba4 commit 287b675
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public static void replayGlobalVariableV2(GlobalVarPersistInfo info) throws DdlE

// Get variable value through variable name, used to satisfy statement like `SELECT @@comment_version`
public static void fillValue(SessionVariable var, VariableExpr desc) throws AnalysisException {
VarContext ctx = ctxByVarName.get(desc.getName());
VarContext ctx = ctxByDisplayVarName.get(desc.getName());
if (ctx == null) {
ErrorReport.reportAnalysisException(ErrorCode.ERR_UNKNOWN_SYSTEM_VARIABLE, desc.getName());
}
Expand Down
4 changes: 4 additions & 0 deletions regression-test/suites/nereids_syntax_p0/system_var.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ suite("nereids_sys_var") {
sql "select @@session.enable_nereids_planner"
result ([[true]])
}
test {
sql "select @@session.experimental_enable_nereids_planner"
result ([[true]])
}
}

0 comments on commit 287b675

Please sign in to comment.