-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[ES|QL] Change equals and hashcode for ConstantNullBlock #131817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
limotova
merged 4 commits into
elastic:main
from
limotova:match-equals-and-hashcodes-for-null-blocks
Jul 24, 2025
Merged
[ES|QL] Change equals and hashcode for ConstantNullBlock #131817
limotova
merged 4 commits into
elastic:main
from
limotova:match-equals-and-hashcodes-for-null-blocks
Jul 24, 2025
+75
−15
Conversation
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
Hi @limotova, I've created a changelog YAML for you. |
Pinging @elastic/es-analytical-engine (Team:Analytics) |
dnhatn
approved these changes
Jul 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Larisa!
💀 |
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
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Analytics/ES|QL
AKA ESQL
auto-backport
Automatically create backport pull requests when merged
>bug
Team:Analytics
Meta label for analytical engine team (ESQL/Aggs/Geo)
v8.19.1
v9.1.1
v9.2.0
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.