Skip to content

Commit 4155652

Browse files
committed
fix: Don't throw unnecessary exception
1 parent 4065e3f commit 4155652

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

axiom/optimizer/ToGraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ ExprCP ToGraph::tryFoldConstant(
179179
auto typedExpr = queryCtx()->optimization()->toTypedExpr(call);
180180
auto exprSet = evaluator_.compile(typedExpr);
181181
const auto& first = *exprSet->exprs().front();
182-
if (first.specialFormKind() != velox::exec::SpecialFormKind::kConstant) {
182+
if (!first.isConstant()) {
183183
return nullptr;
184184
}
185185
const auto& constantExpr =

0 commit comments

Comments
 (0)