Skip to content

Commit

Permalink
[fix](nereids)prevent null pointer access if translate expression fails
Browse files Browse the repository at this point in the history
  • Loading branch information
starocean999 committed Apr 22, 2024
1 parent 8e5369c commit 6ea24d0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ 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
return;
}
tExprMap.put(id, staleExpr.treeToThrift());
} else {
for (int i = 0; i < expr.children().size(); i++) {
Expand Down

0 comments on commit 6ea24d0

Please sign in to comment.