Dont use row block field block offsets if not needed#10825
Merged
sopel39 merged 2 commits intotrinodb:masterfrom Feb 23, 2022
Merged
Dont use row block field block offsets if not needed#10825sopel39 merged 2 commits intotrinodb:masterfrom
sopel39 merged 2 commits intotrinodb:masterfrom
Conversation
c3fff75 to
4b07829
Compare
Member
|
Is it really a draft? If you think it's ready make it non-draft? |
sopel39
reviewed
Jan 31, 2022
core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/test/java/io/trino/spi/block/TestRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/block/BenchmarkRowBlock.java
Outdated
Show resolved
Hide resolved
Member
|
mind automation (maven checks) |
c3a8f3c to
45904d9
Compare
130c1bd to
27e0015
Compare
sopel39
reviewed
Feb 9, 2022
core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
Member
There was a problem hiding this comment.
streams are not good in tight loops. You can use io.airlift.slice.Slices#wrappedIntArray(int[], int, int) to point at specific offset without copying data
core/trino-spi/src/test/java/io/trino/spi/block/TestRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
ab279c6 to
f48db07
Compare
8d269bb to
a163612
Compare
sopel39
reviewed
Feb 11, 2022
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
testing/trino-tests/src/test/java/io/trino/execution/TestEventListenerWithSplits.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
c4cd596 to
3fdc374
Compare
4175e77 to
245c8d5
Compare
skrzypo987
reviewed
Feb 15, 2022
Member
skrzypo987
left a comment
There was a problem hiding this comment.
Added some comments, will look again tomoroow
core/trino-spi/src/main/java/io/trino/spi/block/AbstractRowBlock.java
Outdated
Show resolved
Hide resolved
245c8d5 to
afd150a
Compare
skrzypo987
approved these changes
Feb 17, 2022
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java
Outdated
Show resolved
Hide resolved
afd150a to
d0ed9a0
Compare
sopel39
approved these changes
Feb 22, 2022
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkBlockSerde.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/block/RowBlockEncoding.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/test/java/io/trino/spi/block/TestRowBlock.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/test/java/io/trino/spi/block/TestRowBlock.java
Outdated
Show resolved
Hide resolved
d0ed9a0 to
2a2a3d5
Compare
When there are no null rows within RowBlock then it's not needed to store fieldBlockOffsets. This improves performance and reduces network traffic as fieldBlockOffsets array is not serialized or deserialized. Tests TestRowBlock and TestRowBlockEncoding were added. Benchmark result: Benchmark (before/after) (nullChance) Mode Cnt Score Error Units (before) BenchmarkBlockSerde.deserializeRow 0 avgt 60 17.348 ± 0.109 ns/op (after) BenchmarkBlockSerde.deserializeRow 0 avgt 60 15.205 ± 0.084 ns/op (before) BenchmarkBlockSerde.deserializeRow .01 avgt 60 18.020 ± 0.104 ns/op (after) BenchmarkBlockSerde.deserializeRow .01 avgt 60 18.279 ± 0.113 ns/op (before) BenchmarkBlockSerde.deserializeRow .10 avgt 60 16.859 ± 0.140 ns/op (after) BenchmarkBlockSerde.deserializeRow .10 avgt 60 16.494 ± 0.157 ns/op (before) BenchmarkBlockSerde.deserializeRow .50 avgt 60 10.273 ± 0.044 ns/op (after) BenchmarkBlockSerde.deserializeRow .50 avgt 60 10.491 ± 0.063 ns/op (before) BenchmarkBlockSerde.deserializeRow .90 avgt 60 4.351 ± 0.020 ns/op (after) BenchmarkBlockSerde.deserializeRow .90 avgt 60 4.311 ± 0.013 ns/op (before) BenchmarkBlockSerde.deserializeRow .99 avgt 60 2.919 ± 0.027 ns/op (after) BenchmarkBlockSerde.deserializeRow .99 avgt 60 2.851 ± 0.008 ns/op (before) BenchmarkBlockSerde.serializeRow 0 avgt 60 20.862 ± 0.117 ns/op (after) BenchmarkBlockSerde.serializeRow 0 avgt 60 16.941 ± 0.089 ns/op (before) BenchmarkBlockSerde.serializeRow .01 avgt 60 21.588 ± 0.097 ns/op (after) BenchmarkBlockSerde.serializeRow .01 avgt 60 20.045 ± 0.102 ns/op (before) BenchmarkBlockSerde.serializeRow .10 avgt 60 20.667 ± 0.068 ns/op (after) BenchmarkBlockSerde.serializeRow .10 avgt 60 19.448 ± 0.126 ns/op (before) BenchmarkBlockSerde.serializeRow .50 avgt 60 13.217 ± 0.090 ns/op (after) BenchmarkBlockSerde.serializeRow .50 avgt 60 11.839 ± 0.042 ns/op (before) BenchmarkBlockSerde.serializeRow .90 avgt 60 7.404 ± 0.017 ns/op (after) BenchmarkBlockSerde.serializeRow .90 avgt 60 5.615 ± 0.009 ns/op (before) BenchmarkBlockSerde.serializeRow .99 avgt 60 5.517 ± 0.007 ns/op (after) BenchmarkBlockSerde.serializeRow .99 avgt 60 3.534 ± 0.009 ns/op
2a2a3d5 to
f1459b2
Compare
skrzypo987
approved these changes
Feb 23, 2022
sopel39
approved these changes
Feb 23, 2022
core/trino-main/src/test/java/io/trino/execution/buffer/BenchmarkDataGenerator.java
Show resolved
Hide resolved
Member
|
small comment |
Member
|
Too small, specific change for RN. |
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.
This improves performance and reduces network traffic as fieldBlockOffsets array is not serialized or deserialized.