beetle0915 opened a new pull request, #29148:
URL: https://github.com/apache/flink/pull/29148

   ## What is the purpose of the change
   
   PyFlink maps Python's `~` operator for `Expression` to `isNotTrue`. Although 
`NOT`
   and `IS NOT TRUE` return the same result for non-null booleans, they differ 
for
   `NULL`: `NOT NULL` is `NULL`, while `NULL IS NOT TRUE` is `TRUE`.
   
   This pull request fixes `Expression.__invert__` to preserve SQL three-valued 
logic.
   
   ## Brief change log
   
   - Map `Expression.__invert__` to the Java Table API `not` expression.
   - Update expression summary-string coverage to expect `not(a)`.
   - Add a runtime regression test for `TRUE`, `FALSE`, and `NULL` inputs.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - `test_expression.py` verifies that `~a` produces `not(a)` while
     `a.is_not_true` continues to produce `isNotTrue(a)`.
   - `test_calc.py` executes a nullable Boolean expression and verifies the 
mappings
     `(TRUE, FALSE)`, `(FALSE, TRUE)`, and `(NULL, NULL)`.
   - The related expression, API completeness, and calc tests pass (`17 
passed`).
   - Flake8 passes for the complete `pyflink.table` package.
   - Mypy passes for all 82 source files selected by the project configuration.
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: yes,
     this corrects existing operator behavior without changing the API signature
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): yes, only the 
selected
     built-in Boolean expression changes; no runtime implementation is added
   - Anything that affects deployment or recovery: JobManager (and its 
components),
     Checkpointing, Kubernetes/Yarn, ZooKeeper: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: OpenAI Codex (GPT-5)
   


-- 
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]

Reply via email to