[ES|QL] Change equals and hashcode for ConstantNullBlock#131817
Merged
limotova merged 4 commits intoelastic:mainfrom Jul 24, 2025
Merged
[ES|QL] Change equals and hashcode for ConstantNullBlock#131817limotova merged 4 commits intoelastic:mainfrom
limotova merged 4 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @limotova, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Member
💀 |
nik9000
approved these changes
Jul 24, 2025
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/ConstantNullBlock.java
Show resolved
Hide resolved
This was referenced Jul 24, 2025
Collaborator
limotova
added a commit
to limotova/elasticsearch
that referenced
this pull request
Jul 24, 2025
) Currently in ES|QL if you have a ConstantNullBlock and a DoubleBlock (or any other standard block type: Boolean, BytesRef, Float, Int, Long) and your DoubleBlock can be represented as a ConstantNullBlock, then `doubleBlock.equals(constantNullBlock)` can evaluate as `true` (if position count is the same). However, `constantNullBlock.equals(anyDoubleBlock)` is always false. Likewise, the hashcodes of these two blocks are different, even if `doubleBlock.equals(constantNullBlock)` returns true. This PR addresses that by making the hashcodes equivalent and the equals functions symmetric in returning true.
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Jul 25, 2025
…king * upstream/main: (90 commits) Register a blob cache long counter metric for total evicted regions (elastic#131862) Move plan attribute resolution to its own component (elastic#131830) Make restore support multi-project (elastic#131661) Use logically more correct expression (elastic#131869) [ES|QL] Change equals and hashcode for ConstantNullBlock (elastic#131817) Update `TransportVersion` to support a new model (elastic#131488) Correct slow log user for RCS 2.0 (elastic#130140) Revert "Remove 8.17 from dev branches" Mute org.elasticsearch.compute.aggregation.ValuesBytesRefGroupingAggregatorFunctionTests testSomeFiltered elastic#131878 Remove 8.17 from dev branches Revert "CompressorFactory.compressor (elastic#131655)" (elastic#131866) Add fast path for single value in VALUES aggregator (elastic#130510) Resolve inference release tests failing due to missing feature flag (elastic#131841) [Docs] Replace placeholder URLs (elastic#131309) CompressorFactory.compressor (elastic#131655) add availability info for speed loading setting (elastic#131714) [Logstash] Move `elastic_integration` plugin usage to ES logstash-bridge. (elastic#131486) Migrate x-pack-enrich legacy rest tests to new test framework (elastic#131743) Fix plugin example test failures due to deprecation warning (elastic#131819) Remove deprecated function isNotNullAndFoldable (elastic#130944) ...
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jul 25, 2025
…131892) Currently in ES|QL if you have a ConstantNullBlock and a DoubleBlock (or any other standard block type: Boolean, BytesRef, Float, Int, Long) and your DoubleBlock can be represented as a ConstantNullBlock, then `doubleBlock.equals(constantNullBlock)` can evaluate as `true` (if position count is the same). However, `constantNullBlock.equals(anyDoubleBlock)` is always false. Likewise, the hashcodes of these two blocks are different, even if `doubleBlock.equals(constantNullBlock)` returns true. This PR addresses that by making the hashcodes equivalent and the equals functions symmetric in returning true.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jul 26, 2025
…131893) Currently in ES|QL if you have a ConstantNullBlock and a DoubleBlock (or any other standard block type: Boolean, BytesRef, Float, Int, Long) and your DoubleBlock can be represented as a ConstantNullBlock, then `doubleBlock.equals(constantNullBlock)` can evaluate as `true` (if position count is the same). However, `constantNullBlock.equals(anyDoubleBlock)` is always false. Likewise, the hashcodes of these two blocks are different, even if `doubleBlock.equals(constantNullBlock)` returns true. This PR addresses that by making the hashcodes equivalent and the equals functions symmetric in returning true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently in ES|QL if you have a ConstantNullBlock and a DoubleBlock (or
any other standard block type: Boolean, BytesRef, Float, Int, Long) and
your DoubleBlock can be represented as a ConstantNullBlock, then
doubleBlock.equals(constantNullBlock)can evaluate astrue(ifposition count is the same).
However,
constantNullBlock.equals(anyDoubleBlock)is always false.Likewise, the hashcodes of these two blocks are different, even if
doubleBlock.equals(constantNullBlock)returns true.This PR addresses that by making the hashcodes equivalent and the equals
functions symmetric in returning true.