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

   ## What is the purpose of the change
   
     FLOAT/DOUBLE equality accepts opposite signed zeros, but constant-list 
IN/NOT IN implemented through SEARCH can reject them because the underlying 
hash sets use boxed equality. For example, typed runtime rows with IDs [1, 1, 
2] and
     values [-0.0, -0.0, +0.0] produce [2] for IN (0, 2), while equality 
produces [1, 1, 2].
   
     This change makes floating-point SEARCH membership consistent with 
existing numeric equality for signed zero.
   
     ## Brief change log
   
     - Include both zero representations when preparing a SEARCH constant set 
containing either zero, after casting to the common type.
     - Preserve both representations during code generation.
     - Add compiled codegen regressions and SQL integration tests for 
FLOAT/DOUBLE in batch and streaming.
   
     The general hash-set contracts, generated per-row lookup and NULL handling 
remain unchanged. Existing NaN behavior is preserved.
   
     ## Verifying this change
   
     - Verified red → green: 6 assertion failures among 10 new test invocations 
before the fix; all 10 pass afterward.
     - SearchOperatorGenTest covers both zero directions, IN/NOT IN paths, NULL 
handling, nonzero values, NaN and infinities.
     - FloatingPointInITCase verifies runtime raw bits, logical types, 
generated hash-set code, duplicate rows, singleton and longer lists, and 
nullable boolean results.
     - Targeted unit run: 45 passing invocations across SearchOperatorGenTest, 
ScalarOperatorsTest, CodeGeneratorContextTest and ConvertToNotInOrInRuleTest.
     - Targeted integration run: 46 passing invocations across 
FloatingPointInITCase and ComparisonFunctionITCase, with JUnit parallel 
execution disabled for the final run.
     - Spotless, Checkstyle, root Apache RAT and git diff --check pass.
   
     Tests used the freshly built runtime artifact. Full CI and release-branch 
backports were not run.
   
     ## 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)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): yes, SEARCH 
membership results change; implementation changes are confined to preparing the 
reusable set, with no additional per-record operations or allocations
     - 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
     - Release-note draft: FLOAT and DOUBLE constant-list IN/NOT IN now treat 
opposite signed zeros as equal, consistently with numeric equality.
   
     ---
   
     ##### Was generative AI tooling used to co-author this PR?
   
     - [X] Yes (please specify the tool below)
   
     Generated-by: Codex (model: GPT-6 Astra; client version not exposed)
   
   


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