Repository navigation
Optimize Beam schemas - #41699
Open
reuvenlax wants to merge 20 commits into
Open
Optimize Beam schemas#41699reuvenlax wants to merge 20 commits into
reuvenlax wants to merge 20 commits into
Conversation
…eldAccessDescriptor, RowMessages, and SchemaUtils
…ches, format/boxing fixes)
…byte-size observer, and specialized LogicalType coders
…ompact/fewKeys), CombineFns, and decimal byte-size
…orFactory, POJOUtils, AutoValueUtils, ConvertHelpers, ReflectUtils
…FromRowUsingCreator
…ct with parameterized outputSchema
…ds, WithKeys, and Convert
…cuit, 2-way fast path, and fused broadcast joins
…oFnInvokerBase timer maps
… YAML Java providers (Explode, Logging, ErrorHandling, JavaRowUdf, StringCompiler, MapToFields, Filter)
… Thrift, AWS2, and Arrow extensions
…c, and fused DirectSchemaCoderGenerator
…rs and FromRowUsingCreator
… a single OutputStream flush
…ithGetters cache, and POJOUtils creator chunking
Fixes all 31 Round 1 findings (C1-C6, P1-P12, T1-T13) across correctness, bytecode safety, JVM performance, and test coverage: - RowWireCodec: guard readExact(len==0), readNullMask/readNullBytes(0/<0), overflow-safe buf.length checks in packWideNullHeader*, single-pass 8-fields/byte packWideNullHeaderFromArray/List with outlined huge fallback, INT_LE extractChunkNullMask32/putChunkNullMask32/patchWideNullHeaderPrefix, ScratchPool MAX_DEPTH=8, and GC-safe RefScratchPool. - DirectSchemaCoderGenerator: 0-alloc wide nullable JavaBean encode (compact refSlotByPos + RefScratchPool), 0-alloc bit-packed ByteSizeChunkImpl return ((chunkBytes<<6)|localNullTag + 1L<<57 overflow guard), single-buffer in-place ChunkedEncodeImpl null header, needsScratchForDecode skip + OOM-safe non-overlapping try/catch scopes, direct mask==0 chunk decode dispatch, omit empty chunk methods, and shared ASM helpers. - RowCoderGenerator: unlock getOrGenerateFieldCodec from cacheLock with weighted Metaspace budget (MAX_GENERATED_FIELD_CODEC_WEIGHT=512), omit dead decNullC*/encRowC* families gated by supports*(), direct mask==0 chunk decode dispatch, needsDecodeScratch skip, O(1) cheapCheckPositions, 1-byte hot local slots, and transient chunkedFieldCodec. - Schema: restore O(1) Long.bitCount slot lookup for index < 64, lazy highContainerCacheSlots for index >= 64, consistent IndexOutOfBoundsException check, and remove dead isCacheableContainerField. - POJOUtils: restore generation-time zero-arg constructor validation in ChunkedSetFieldCreateInstruction and flatten SetFieldChunkInstruction Compound tree. - DirectSchemaCoderTest: add exhaustive wide-schema coverage across cutoffs (64/65/1024/1025/4200), reversed encodingPositions, non-nullable/static POJOs & JavaBeans, rich types, evolution, error branches, and POJOUtils/Schema/RowWireCodec edge cases. Verified with Spotless, Checkstyle, 628/628 core schema/coder tests, benchmarks, and unanimous 3/3 Round 2 reviewer approvals.
Contributor
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
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.
No description provided.