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
ESQL: More tracking in BlockHash impls #101488
ESQL: More tracking in BlockHash impls #101488
Conversation
This adds memory tracking to more parts of the `BlockHash` implementations. It also reworks the tests so they assert based on callbacks which is more like how they are used in production.
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Hi @nik9000, I've created a changelog YAML for you. |
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.
@@ -75,7 +75,7 @@ private IntBlock add(BooleanBlock block) { | |||
|
|||
@Override | |||
public BooleanBlock[] getKeys() { | |||
BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(everSeen.length); | |||
BooleanBlock.Builder builder = blockFactory.newBooleanBlockBuilder(everSeen.length); |
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.
nit: in a try clause?
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.
++
@@ -90,7 +90,7 @@ public BooleanBlock[] getKeys() { | |||
|
|||
@Override | |||
public IntVector nonEmpty() { | |||
IntVector.Builder builder = IntVector.newVectorBuilder(everSeen.length); | |||
IntVector.Builder builder = blockFactory.newIntVectorBuilder(everSeen.length); |
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.
nit: in a try clause?
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.
++
keyBlocks[g] = builders[g].build(); | ||
} | ||
} finally { | ||
if (keyBlocks[keyBlocks.length - 1] == null) { |
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.
++
…blockhash' into esql_track_unused_blockhash
This adds memory tracking to more parts of the `BlockHash` implementations. It also reworks the tests so they assert based on callbacks which is more like how they are used in production.
This adds memory tracking to more parts of the
BlockHash
implementations. It also reworks the tests so they assert based on callbacks which is more like how they are used in production.