Several StartsWith / NotStartsWith visitors appear to compare binary values by converting them with str(...), which gives incorrect byte-prefix behavior.
Examples:
StartsWith("x", b"a") on b"aa" -> False # expected True
NotStartsWith("x", b"a") on b"aa" -> True # expected False
This also affects planning paths:
inclusive metrics for a file containing only b"aa":
StartsWith("x", b"a") -> False # unsafe skip
Manifest evaluation for binary StartsWith can also raise TypeError when comparing decoded bytes bounds to a str prefix.
Relevant code: pyiceberg/expressions/visitors.py starts-with handling in expression, manifest, metrics, and residual visitors.
Several
StartsWith/NotStartsWithvisitors appear to compare binary values by converting them withstr(...), which gives incorrect byte-prefix behavior.Examples:
This also affects planning paths:
Manifest evaluation for binary
StartsWithcan also raiseTypeErrorwhen comparing decodedbytesbounds to astrprefix.Relevant code:
pyiceberg/expressions/visitors.pystarts-with handling in expression, manifest, metrics, and residual visitors.