Support BYTES array literals end to end - #19247
Draft
xiangfu0 wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19247 +/- ##
=============================================
- Coverage 66.97% 39.04% -27.94%
- Complexity 1417 1422 +5
=============================================
Files 3453 3453
Lines 218858 218927 +69
Branches 34787 34802 +15
=============================================
- Hits 146591 85488 -61103
- Misses 60556 125619 +65063
+ Partials 11711 7820 -3891
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
X'0102'asBYTESand constructBYTES_ARRAYvalues in both query engines.byte[][]toByteArray[]before block serialization.Usage
Declare a stored multi-value BYTES column with the existing Pinot schema representation:
{ "name": "byte_values", "dataType": "BYTES", "singleValueField": false }Construct a BYTES array with standard SQL hex binary literals:
Use the literal with an ingested multi-value BYTES column:
Use
X'CAFE'for bytes rather than the string'CAFE'. Query response values are hex strings, and result metadata reportsBYTES_ARRAY.Compatibility
This change adds no Thrift or protobuf fields. The single-stage engine retains the existing
arrayValueConstructorexpression with scalarbinaryValueoperands on the broker/server wire, while the multi-stage engine uses its existingBYTES_ARRAYprotobuf representation. This avoids introducing a new literal union arm that older servers cannot decode.Validation
BytesMvTypeTest: 14/14 passed, covering Avroarray<bytes>ingestion, dictionary and raw storage, projection, literal-only queries, andARRAYS_OVERLAPunder both query engines.LiteralOnlyBrokerRequestTest,RequestUtilsTest, andArrayLiteralTransformFunctionTest: passed in a clean focused reactor build.RexExpressionSerDeTest: 20/20 passed.TransformOperatorTest: 8/8 passed.spotless:apply,checkstyle:check,license:format, andlicense:check: passed for all six affected modules.The full
test-compile -Xlint:allreactor check stops in unchangedpinot-segment-localbecauseZstandardDecompressorcannot resolveorg.jetbrains.annotations.NotNullunder JDK 25. All affected sources were compiled by the focused green test runs above, and no warning was emitted for an added line before that baseline failure.