Uh oh!
There was an error while loading. Please reload this page.
[test](regression) skip Arrow-incompatible complex outputs - #65182
Merged
yiguolei merged 1 commit intoJul 3, 2026
Conversation
hello-stephen
commented
Jul 3, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
shuke987
commented
Jul 3, 2026
ContributorAuthor
run buildall |
shuke987
commented
Jul 3, 2026
ContributorAuthor
/review |
Contributor
There was a problem hiding this comment.
Automated review completed for PR 65182.
I did not find an evidence-backed issue that needs an inline review comment. The PR is test-only and keeps the changes focused on Arrow Flight SQL incompatibilities:
test_cast.groovyskips only the two map-cast checks that intentionally produce null map keys whencontext.useArrowFlightSql()is true.test_aggregate_all_functions.groovykeeps the JDBC bitmap checks unchanged and adds Arrow-specificqtlabels that comparebitmap_to_string(user_id)instead of the raw BITMAP column.- The added
.outblocks match the projected Arrow query shape.
Critical checkpoint conclusions:
- Goal and coverage: the patch addresses the stated Arrow Flight SQL test incompatibilities; it adds/updates regression expectations for the affected aggregate checks and skips the Arrow-incompatible map-key cases.
- Scope and focus: the modification is small and limited to regression tests and expected output.
- Concurrency/lifecycle/persistence/config/protocol: not applicable; no production FE/BE/cloud code or persisted format changes.
- Parallel paths: JDBC and Arrow paths are separated by
context.useArrowFlightSql(), with existing JDBC checks retained. - Expected output correctness: the regression framework allows skipped
qtblocks by searching forward to the executed tag, so preserving the JDBC-onlymap_to_map2andmap_to_map3output blocks is compatible with skipping them in Arrow mode. - User focus: no additional user-provided focus was supplied.
Subagent conclusions:
optimizer-rewrite: no candidates; final convergence returnedNO_NEW_VALUABLE_FINDINGS.tests-session-config: no candidates; final convergence returnedNO_NEW_VALUABLE_FINDINGS.- No candidate became an inline comment, and no duplicate suppression was needed.
Validation:
- Reviewed the GitHub PR file list and patch for all three changed files.
- Refreshed the PR head before submission; head remained
eea7146b5e6a6ac91b6c302ff865c1616cecbafe. - Checked the PR patch for added trailing whitespace and reverse-apply consistency.
- Did not run regression tests because this checkout lacks
.worktree_initializedandthirdparty/installed; validation was static.
yiguolei
approved these changes
Jul 3, 2026
Uh oh!
There was an error while loading. Please reload this page.
63 tasks
This was referenced Sep 1, 2026
morningman added a commit
that referenced
this pull request
Sep 2, 2026
…connection (#67381) ### What problem does this PR solve? Issue Number: close#67364 Related PR: #65182, #65615 Problem Summary: Reading anything over Arrow Flight SQL fails with `INTERNAL` / `IllegalStateException` as soon as the query hits the FE sql cache. The FE sql cache is keyed by `<catalog>.<db>:<user>:<sql text>` (`NereidsSqlCacheManager.generateCacheKey`) and is shared by every protocol, but its rows are MySQL wire protocol packets that `StmtExecutor.sendCachedValues` replays through a `MysqlChannel`. An Arrow Flight SQL connection has no channel, so an entry created by an identical MySQL query makes `handleQueryStmt` take the cached-plan branch and fail `Preconditions.checkState(connectType == MYSQL)` in `sendFields()`. The client sees: ``` INTERNAL: get flight info statement failed, after executeQueryStatement handleQuery, error code: ERR_UNKNOWN_ERROR, error msg: IllegalStateException, msg: null ``` The `CacheAnalyzer` branch right below it is already gated on `channel != null` with a `// TODO support arrow flight sql`; only this cached-plan replay was left unguarded. **This is not about `HLL` / `QUANTILE_STATE`.** The issue was reported on raw aggregate-state columns, but both the FE schema helper and the BE map `HLL` / `BITMAP` / `QUANTILE_STATE` to Arrow `binary` and have Arrow writers for them, and they read back correctly once the query is actually executed. They only looked special because that sql text was the one primed through the MySQL control session; `select 1` fails exactly the same way. Two conditions have to line up, which is why this is not seen more often: 1. The same sql text must have been run on a MySQL connection first (an Arrow Flight connection never populates the cache). 2. Both sessions must agree on every session variable the cache compares (`NereidsSqlCacheManager.usedVariablesChanged` over the `affectQueryResult*` set). The MySQL **JDBC driver** adds `STRICT_TRANS_TABLES` to `sql_mode` at connect time while the Arrow Flight JDBC driver does not, so a JDBC control session masks the bug -- a `mysql` CLI session, or any client that leaves `sql_mode` alone, does not. ### What is changed - `ConnectProcessor.executeQuery`: look the sql cache up only for a MySQL connection. Any other protocol re-executes the query and gets its result from the BE. Such a connection never populates the cache either, so this only removes a broken read path; it does not change MySQL behaviour. - `StmtExecutor.handleQueryStmt`: assert the channel in the cached-plan branch, so a future regression names the protocol instead of throwing a bare `IllegalStateException`. - `SessionVariable`: mark `return_object_data_as_binary` as `affectQueryResultInExecution`. It is forwarded to the BE and decides whether the MySQL result writer serializes `HLL` / `BITMAP` / `QUANTILE_STATE` as their raw bytes or as NULL, so it changes the cached rows and must take part in the cache key comparison. Without it, a session that turns it on is served the NULLs cached by a session that had it off -- a separate, pure-MySQL-protocol correctness bug in the same family.
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 freeto 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.
What
bitmap_to_string(user_id)instead of raw bitmap bytes.Why
{null:...}for these cast semantics checks.\N, while Arrow exposes binary bytes. The stable semantic assertion isbitmap_to_string.Testing
Not run. This PR is intentionally independent of #65084; run buildall after #65084 is merged.