Skip to content

Commit

Permalink
[fix](fe) Fix enable_nereids_planner forward not take effect (apach…
Browse files Browse the repository at this point in the history
…e#26782)

* The java reflection method `getFields()` only return public fields,
  but enable_nereids_planner is private
  • Loading branch information
SWJTU-ZhangLei committed Nov 17, 2023
1 parent c4e8235 commit d2ed4de
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2502,8 +2502,9 @@ public Map<String, String> getForwardVariables() {
**/
public void setForwardedSessionVariables(Map<String, String> variables) {
try {
Field[] fields = SessionVariable.class.getFields();
Field[] fields = SessionVariable.class.getDeclaredFields();
for (Field f : fields) {
f.setAccessible(true);
VarAttr varAttr = f.getAnnotation(VarAttr.class);
if (varAttr == null || !varAttr.needForward()) {
continue;
Expand Down

0 comments on commit d2ed4de

Please sign in to comment.