-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Specialize serialization for ArrayVectors #105893
Conversation
e1f9b7a
to
5e18be5
Compare
5e18be5
to
3ff58b7
Compare
@@ -30,6 +34,25 @@ final class BytesRefArrayVector extends AbstractVector implements BytesRefVector | |||
this.values = values; | |||
} | |||
|
|||
static BytesRefArrayVector readArrayVector(int positions, StreamInput in, BlockFactory blockFactory) throws IOException { | |||
final BytesRefArray values = new BytesRefArray(in, blockFactory.bigArrays()); |
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.
This is the main improvement in this PR. The rest is for a follow-up where we will implement specialized serialization for ArrayBlock.
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @dnhatn, I've created a changelog YAML for you. |
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/Vector.java
Show resolved
Hide resolved
Thanks Nik! |
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.
I love it. And how we can evolve the serial form in a BWC way through the initial Boolean/byte. This was always my hope - nice to see it work in reality. Belated LGTM
A follow-up of #105893 Currently, we serialize blocks value by value, which is simple but effective. However, it would be more efficient to serialize the underlying structures of array blocks instead.
Currently, we serialize blocks and vectors value by value, employing a simple yet effective approach. However, there are specific cases where we can enhance performance by serializing the underlying structure instead:
firstValueIndexes
,nullsMask
, and the underlying vector of an ArrayBlock instead of rebuilding the block from values.This PR addresses the first bullet point and lays the groundwork for implementing the second.