apache/iceberg · error · UnsupportedOperationException
BelowMin has no value
Error message
BelowMin has no value
What it means
BelowMin is a sentinel literal representing values smaller than any representable value of the target type, produced when literal conversion underflows. Like AboveMax it is a marker only — there is no backing T value — so value() throws UnsupportedOperationException rather than returning null or a fabricated value.
Source
Thrown at api/src/main/java/org/apache/iceberg/expressions/Literals.java:209
@Override
public Comparator<T> comparator() {
throw new UnsupportedOperationException("AboveMax has no comparator");
}
@Override
public String toString() {
return "aboveMax";
}
}
static class BelowMin<T> implements Literal<T> {
private static final BelowMin INSTANCE = new BelowMin();
private BelowMin() {}
@Override
public T value() {
throw new UnsupportedOperationException("BelowMin has no value");
}
@Override
public <X> Literal<X> to(Type type) {
throw new UnsupportedOperationException("Cannot change the type of BelowMin");
}
@Override
public Comparator<T> comparator() {
throw new UnsupportedOperationException("BelowMin has no comparator");
}
@Override
public String toString() {
return "belowMin";
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Check for the sentinel before reading the value: if (lit == Literals.belowMin()) handle specially
- Branch on the bound predicate's evaluation semantics instead of extracting the raw value from sentinels
- If the literal came from user input, validate the value fits the column type before converting
Example fix
// before
Object v = lit.value();
// after
if (lit == Literals.belowMin()) {
// no value exists; treat comparison as always-true/false per operation
} else {
Object v = lit.value();
} Defensive patterns
Strategy: type-guard
Validate before calling
if (lit == Literals.belowMin()) { /* handle: no value exists */ } Type guard
static boolean isSentinel(Literal<?> lit) { return lit == Literals.belowMin() || lit == Literals.aboveMax(); } Try / catch
try { Object v = lit.value(); } catch (UnsupportedOperationException e) { /* sentinel: use always-true/false semantics */ } Prevention
- Never treat Literal.to() output as a normal value without a sentinel check
- Validate user values against column ranges before literal creation
- Favor bound predicates for evaluation logic
When it happens
Trigger: Calling value() on the object returned by Literals.belowMin(), usually obtained as the result of Literal.to(Type) when a literal underflows the target type during predicate binding.
Common situations: Generic code that iterates literals and reads .value() for logging, serialization, or custom evaluation without first excluding the belowMin sentinel.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- AboveMax has no comparator
- BelowMin has no comparator
- Cannot change the type of BelowMin
- Unsupported aggregate type: %s
- Cannot convert JSON to literal: " + node
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/28685715a83d62f7.
Report an issue: GitHub.