Merged
Conversation
8fa9212 to
53f0fb8
Compare
53f0fb8 to
502d522
Compare
Collaborator
|
Hi @dnhatn, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
costin
approved these changes
Mar 10, 2025
Comment on lines
+23
to
+48
| BOOLEAN(0, "Boolean", BlockFactory::newBooleanBlockBuilder, BooleanBlock::readFrom), | ||
| INT(1, "Int", BlockFactory::newIntBlockBuilder, IntBlock::readFrom), | ||
| LONG(2, "Long", BlockFactory::newLongBlockBuilder, LongBlock::readFrom), | ||
| FLOAT(3, "Float", BlockFactory::newFloatBlockBuilder, FloatBlock::readFrom), | ||
| DOUBLE(4, "Double", BlockFactory::newDoubleBlockBuilder, DoubleBlock::readFrom), | ||
| /** | ||
| * Blocks containing only null values. | ||
| */ | ||
| NULL("Null", (blockFactory, estimatedSize) -> new ConstantNullBlock.Builder(blockFactory)), | ||
| NULL(5, "Null", (blockFactory, estimatedSize) -> new ConstantNullBlock.Builder(blockFactory), BlockStreamInput::readConstantNullBlock), | ||
|
|
||
| BYTES_REF("BytesRef", BlockFactory::newBytesRefBlockBuilder), | ||
| BYTES_REF(6, "BytesRef", BlockFactory::newBytesRefBlockBuilder, BytesRefBlock::readFrom), | ||
|
|
||
| /** | ||
| * Blocks that reference individual lucene documents. | ||
| */ | ||
| DOC("Doc", DocBlock::newBlockBuilder), | ||
| DOC(7, "Doc", DocBlock::newBlockBuilder, in -> { throw new UnsupportedOperationException("can't read doc blocks"); }), | ||
|
|
||
| /** | ||
| * Composite blocks which contain array of sub-blocks. | ||
| */ | ||
| COMPOSITE("Composite", BlockFactory::newAggregateMetricDoubleBlockBuilder), | ||
| COMPOSITE(8, "Composite", BlockFactory::newAggregateMetricDoubleBlockBuilder, CompositeBlock::readFrom), | ||
|
|
||
| /** | ||
| * Intermediate blocks which don't support retrieving elements. | ||
| */ | ||
| UNKNOWN("Unknown", (blockFactory, estimatedSize) -> { throw new UnsupportedOperationException("can't build null blocks"); }); | ||
| UNKNOWN(9, "Unknown", (blockFactory, estimatedSize) -> { throw new UnsupportedOperationException("can't build null blocks"); }, in -> { |
Member
There was a problem hiding this comment.
Minute point: for future extensibility, maybe space out (multiple of two) the writeable code instead of using consecutive numbers: e.g.:
0 - null
1 - unknown
2-3 - unused
4-15: java primitives (including those not supported yet such as byte)
16-32: rest of the objects (doc, composite, etc..)
Member
Author
There was a problem hiding this comment.
I think we can add new element types with the next ids.
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/ElementType.java
Show resolved
Hide resolved
idegtiarenko
approved these changes
Mar 10, 2025
luigidellaquila
approved these changes
Mar 10, 2025
Contributor
luigidellaquila
left a comment
There was a problem hiding this comment.
LGTM, thanks Nhat!
Member
Author
|
Thanks everyone! |
georgewallace
pushed a commit
to georgewallace/elasticsearch
that referenced
this pull request
Mar 11, 2025
Currently, we use NamedWriteable for serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered in ElementType, we can safely switch from NamedWriteable to typed code. For example, the NamedWriteable alone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements with FROM idx | LIMIT 10000 where the target index has 10K fields: - write_exchange_response executed 173 times took: 73.2ms -> 26.7ms - read_exchange_response executed 173 times took: 49.4ms -> 25.8ms
albertzaharovits
pushed a commit
to albertzaharovits/elasticsearch
that referenced
this pull request
Mar 13, 2025
Currently, we use NamedWriteable for serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered in ElementType, we can safely switch from NamedWriteable to typed code. For example, the NamedWriteable alone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements with FROM idx | LIMIT 10000 where the target index has 10K fields: - write_exchange_response executed 173 times took: 73.2ms -> 26.7ms - read_exchange_response executed 173 times took: 49.4ms -> 25.8ms
jfreden
pushed a commit
to jfreden/elasticsearch
that referenced
this pull request
Mar 13, 2025
Currently, we use NamedWriteable for serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered in ElementType, we can safely switch from NamedWriteable to typed code. For example, the NamedWriteable alone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements with FROM idx | LIMIT 10000 where the target index has 10K fields: - write_exchange_response executed 173 times took: 73.2ms -> 26.7ms - read_exchange_response executed 173 times took: 49.4ms -> 25.8ms
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
dnhatn
added a commit
to dnhatn/elasticsearch
that referenced
this pull request
Mar 13, 2025
Currently, we use NamedWriteable for serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered in ElementType, we can safely switch from NamedWriteable to typed code. For example, the NamedWriteable alone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements with FROM idx | LIMIT 10000 where the target index has 10K fields: - write_exchange_response executed 173 times took: 73.2ms -> 26.7ms - read_exchange_response executed 173 times took: 49.4ms -> 25.8ms (cherry picked from commit 79a1626)
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 14, 2025
Currently, we use NamedWriteable for serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered in ElementType, we can safely switch from NamedWriteable to typed code. For example, the NamedWriteable alone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements with FROM idx | LIMIT 10000 where the target index has 10K fields: - write_exchange_response executed 173 times took: 73.2ms -> 26.7ms - read_exchange_response executed 173 times took: 49.4ms -> 25.8ms (cherry picked from commit 79a1626)
dnhatn
added a commit
that referenced
this pull request
Mar 20, 2025
Adjust wire version after backporting to 8.x. Relates #124394
smalyshev
pushed a commit
to smalyshev/elasticsearch
that referenced
this pull request
Mar 21, 2025
Adjust wire version after backporting to 8.x. Relates elastic#124394
omricohenn
pushed a commit
to omricohenn/elasticsearch
that referenced
this pull request
Mar 28, 2025
Adjust wire version after backporting to 8.x. Relates elastic#124394
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, we use
NamedWriteablefor serializing blocks. While convenient, it incurs a noticeable performance penalty when pages contain thousands of blocks. Since block types are small and already centered inElementType, we can safely switch fromNamedWriteableto typed code. For example, theNamedWriteablealone of a small page with 10K fields would be 180KB, whereas the new method reduces it to 10KB. Below are the serialization improvements withFROM idx | LIMIT 10000where the target index has 10K fields:positionCountas we should already have it from the page.