Skip to content

Commit

Permalink
[fix](nereids)prevent null pointer access if translate expression fai…
Browse files Browse the repository at this point in the history
…ls (apache#33990)
  • Loading branch information
starocean999 authored Apr 26, 2024
1 parent 132d974 commit 0038423
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ private static void collectConst(Expression expr, Map<String, Expression> constM
LOG.warn("expression {} translate to legacy expr failed. ", expr, e);
return;
}
if (staleExpr == null) {
// just return, it's a fail-safe
LOG.warn("expression {} translate to legacy expr failed. ", expr);
return;
}
tExprMap.put(id, staleExpr.treeToThrift());
} else {
for (int i = 0; i < expr.children().size(); i++) {
Expand Down

0 comments on commit 0038423

Please sign in to comment.