You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kevinjqliu (via GitHub)" <gi...@apache.org> on 2026/06/13 18:41:06 UTC
[I] NotStartsWith residual evaluation always returns false [iceberg-python]
kevinjqliu opened a new issue, #3496:
URL: https://github.com/apache/iceberg-python/issues/3496
`ResidualVisitor.visit_not_starts_with` appears to always return `AlwaysFalse()` for partitioned residuals because it applies Python `not` to the `AlwaysTrue()` / `AlwaysFalse()` object returned by `visit_starts_with`.
Example with an identity partition:
```text
partition value: x_part = "bb"
filter: NotStartsWith("x", "a")
actual residual: AlwaysFalse()
expected residual: AlwaysTrue()
```
This can attach an incorrect residual to planned scan tasks.
Relevant code: `pyiceberg/expressions/visitors.py` `ResidualVisitor.visit_not_starts_with`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] NotStartsWith residual evaluation always returns false [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu closed issue #3496: NotStartsWith residual evaluation always returns false
URL: https://github.com/apache/iceberg-python/issues/3496
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] NotStartsWith residual evaluation always returns false [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on issue #3496:
URL: https://github.com/apache/iceberg-python/issues/3496#issuecomment-4699448374
Verified against the current worktree.
```text
StartsWith("x", "a") on identity partition "aa" -> AlwaysTrue()
NotStartsWith("x", "a") on identity partition "aa" -> AlwaysFalse()
NotStartsWith("x", "a") on identity partition "bb" -> AlwaysFalse() # expected AlwaysTrue()
```
Root cause is `ResidualVisitor.visit_not_starts_with`: it applies Python `not` to an `AlwaysTrue()` / `AlwaysFalse()` expression object, and both objects are truthy.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org