geruh opened a new pull request, #2780: URL: https://github.com/apache/iceberg-python/pull/2780
related to #2775 # Rationale for this change This PR aligns the `AlwaysTrue` and `AlwaysFalse` expression serialization to use the boolean primitives `true`/`false` instead of string representation, matching the Iceberg [ExpressionParser](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/expressions/ExpressionParser.java#L101-L108). I know the spec defines the true/false expressions as string but today we can't hit the scan planning client endpoint following these models. I know the spec defines the true/false expressions as a string representation, but currently we can't successfully use the scan planning client endpoint with those models. Java's actual implementation serializes these as boolean literals. For instance, with what we have today we would throw an illegal argument exception: ``` { "snapshot-id": 2540284336700708540, "filter": "true", "case-sensitive": true } ``` Throws: `java.lang.IllegalArgumentException: argument "content" is null` But, this works just fine (notice no quotes): ``` { "snapshot-id": 2540284336700708540, "filter": true, "case-sensitive": true } ``` ## Are these changes tested? Yes ## Are there any user-facing changes? No, this only affects the JSON serialization format to match Java Cores behavior. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
