pola-rs/polars · error · TypeError
Unknown: {lhs} {op} {rhs}
Error message
Unknown: {lhs} {op} {rhs} What it means
Error "Unknown: {lhs} {op} {rhs}" thrown in pola-rs/polars.
Source
Thrown at py-polars/src/polars/io/iceberg/_utils.py:239
@_convert_predicate.register(Attribute)
def _(a: Attribute) -> Any:
return a.attr
@_convert_predicate.register(BinOp)
def _(a: BinOp) -> Any:
lhs = _ensure_boolean_expression(_convert_predicate(a.left))
rhs = _ensure_boolean_expression(_convert_predicate(a.right))
op = a.op
if isinstance(op, BitAnd):
return pyiceberg.expressions.And(lhs, rhs)
if isinstance(op, BitOr):
return pyiceberg.expressions.Or(lhs, rhs)
else:
msg = f"Unknown: {lhs} {op} {rhs}"
raise TypeError(msg)
@_convert_predicate.register(Compare)
def _(a: Compare) -> Any:
op = a.ops[0]
lhs = _convert_predicate(a.left)[0]
rhs = _convert_predicate(a.comparators[0])
if isinstance(op, Gt):
return pyiceberg.expressions.GreaterThan(lhs, rhs) # type: ignore[misc, call-arg]
if isinstance(op, GtE):
return pyiceberg.expressions.GreaterThanOrEqual(lhs, rhs) # type: ignore[misc, call-arg]
if isinstance(op, Eq):
return pyiceberg.expressions.EqualTo(lhs, rhs) # type: ignore[misc, call-arg]
if isinstance(op, Lt):
return pyiceberg.expressions.LessThan(lhs, rhs) # type: ignore[misc, call-arg]
if isinstance(op, LtE):
return pyiceberg.expressions.LessThanOrEqual(lhs, rhs) # type: ignore[misc, call-arg]View on GitHub (pinned to df599052da)
When it happens
Trigger: Thrown at py-polars/src/polars/io/iceberg/_utils.py:239 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pola-rs/polars@df599052da (2026-08-16).
Data as JSON: /api/errors/42083c47bb27673c.
Report an issue: GitHub.