Skip to content

Commit 6acc07a

Browse files
committed
add literal IsNaN check
1 parent 76402b5 commit 6acc07a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/iceberg/expression/predicate.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ Result<std::unique_ptr<UnboundPredicateImpl<B>>> UnboundPredicateImpl<B>::Make(
7171
return InvalidExpression("Cannot create {} predicate inclusive a value",
7272
::iceberg::ToString(op));
7373
}
74+
if (value.IsNaN()) [[unlikely]] {
75+
return InvalidExpression(
76+
"Invalid expression literal: NaN, use isNaN or notNaN instead");
77+
}
7478
return std::unique_ptr<UnboundPredicateImpl<B>>(
7579
new UnboundPredicateImpl<B>(op, std::move(term), std::move(value)));
7680
}

0 commit comments

Comments
 (0)