Support STRING_ARRAY literal rendering - #19246
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes server-side rendering of folded STRING_ARRAY literals by teaching LiteralContext.toString() how to format PinotDataType.STRING_ARRAY, and adds unit + integration coverage to prevent regressions across both query engines.
Changes:
- Add
STRING_ARRAYrendering support inLiteralContext.toString(). - Add unit test coverage for Thrift
STRING_ARRAY_VALUEconversion + rendering behavior. - Add an integration test that validates multi-value STRING ingestion and folded string-array literal behavior (projection +
ARRAYS_OVERLAP) under both query engines.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pinot-common/src/main/java/org/apache/pinot/common/request/context/LiteralContext.java | Adds STRING_ARRAY handling to toString() to avoid IllegalStateException during result rendering. |
| pinot-common/src/test/java/org/apache/pinot/common/request/context/LiteralContextTest.java | Adds a focused unit test validating STRING_ARRAY_VALUE conversion and toString() output. |
| pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/custom/ArrayTest.java | Adds an integration test covering ingested MV STRING column behavior plus folded string-array literals and ARRAYS_OVERLAP filtering across engines. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+533
to
+534
| // Selecting an ingested column sends the single-stage query to the servers, where the folded STRING_ARRAY literal | ||
| // is rendered. The returned column also verifies the Avro multi-value STRING data was ingested correctly. |
Jackie-Jiang
approved these changes
Aug 13, 2026
Jackie-Jiang
left a comment
Contributor
There was a problem hiding this comment.
How about MV BYTES? If needed, make a separate PR for it
Contributor
Author
|
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
STRING_ARRAYvalues inLiteralContextSTRING_ARRAY_VALUEconversion and renderingArrayTestintegration test that validates ingested multi-value STRING data and composed string-array literals in projections andARRAYS_OVERLAPfilters with both query enginesReproduction
Before this change, a table-backed single-stage query such as:
folds the array constructor into a Thrift
STRING_ARRAY_VALUE. When the server builds the selection result schema,LiteralContext.toString()throws:Literal-only queries avoid the server selection path, which is why the failure requires a table-backed projection.
Validation
LiteralContextTest: 11 tests passed./mvnw -pl pinot-integration-tests -am -Dtest=ArrayTest#testFoldedStringArrayLiteralWithIngestedColumn -Dsurefire.failIfNoSpecifiedTests=false test: 2 tests passed, covering both query engines./mvnw spotless:apply -pl pinot-common,pinot-integration-tests./mvnw checkstyle:check -pl pinot-common,pinot-integration-tests./mvnw license:format -pl pinot-common,pinot-integration-tests./mvnw license:check -pl pinot-common,pinot-integration-tests