Skip to content

Commit b59dba6

Browse files
committed
add comment and error msg
1 parent 2fc8524 commit b59dba6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/iceberg/expression/predicate.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ Result<std::shared_ptr<Expression>> UnboundPredicate<B>::BindLiteralOperation(
187187
}
188188

189189
if (values_.size() != 1) {
190-
return InvalidExpression("Literal operation requires a single value");
190+
return InvalidExpression("Literal operation requires a single value but got {}",
191+
values_.size());
191192
}
192193

193194
const auto& literal = values_[0];
@@ -240,6 +241,7 @@ Result<std::shared_ptr<Expression>> UnboundPredicate<B>::BindInOperation(
240241
return InvalidExpression("Invalid value for conversion to type {}: {} ({})",
241242
*bound_term->type(), literal.ToString(), *literal.type());
242243
}
244+
// Filter out literals that are out of range after conversion.
243245
if (!converted.IsBelowMin() && !converted.IsAboveMax()) {
244246
converted_literals.push_back(std::move(converted));
245247
}

0 commit comments

Comments
 (0)