Repository navigation
[feature](be) Add session controls for Parquet page indexes - #69971
Conversation
### What problem does this PR solve? Problem Summary: Parquet output currently relies on implicit page-index and data-page-size defaults. Add validated session variables for controlling ColumnIndex/OffsetIndex output and the target data-page size across OUTFILE, EXPORT, Hive and Iceberg writes. Preserve the existing enabled index default, 1 MiB page target and Hadoop-framed LZ4 compatibility limit. ### Release note Add enable_parquet_write_page_index (default true) and parquet_write_data_page_size (default 1048576 bytes) for new Parquet output. ### Check List (For Author) - Test: 16 BE ASAN tests and 9 FE tests passed; clang-format 16, build hygiene, FE Checkstyle and clang-tidy passed. - Behavior changed: Yes; users can explicitly disable page indexes and adjust the target data-page size. Existing defaults are preserved. - Does this need documentation: Yes; paired English and Chinese Parquet documentation.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
|
Codex automated review failed and did not complete. Error: Selected model is at capacity. Please try a different model. Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
TPC-H: Total hot run time: 28790 ms |
TPC-DS: Total hot run time: 151775 ms |
ClickBench: Total hot run time: 25.2 s |
FE UT Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
There was a problem hiding this comment.
No actionable defect was found in the five changed files at head 3b20906. No existing inline comments require retention, and no additional user focus was supplied.
The reviewed flow is:
SET -> SessionVariable -> forwarding/session snapshot -> toThrift/TQueryOptions
-> coordinator -> RuntimeState -> common VParquetWriter properties -> output file
EXPORT captures the session and runs generated OUTFILE statements through this flow.
Hive, Iceberg and native Parquet TVF sinks share the common writer.
Applicable critical-checkpoint conclusions:
| Checkpoint | Conclusion |
|---|---|
| Goal and proof | The two controls reach the common writer. Added FE tests inspect defaults, bounds and forwarding; BE tests inspect real metadata and readback. These tests were inspected, not executed. |
| Scope and reuse | The implementation is focused: existing session reflection, query-options transport, compression helper and Arrow property builder are reused. |
| Concurrency and locking | Values are captured into query options and read during per-file open. No new threads, shared mutable state, lock order or heavy locked operation is introduced. |
| Lifecycle and static initialization | Existing writer, converter and output-stream ownership/close paths remain. The new constant is constexpr; there is no cross-translation-unit initialization dependency or new resource cycle. |
| Dynamic configuration | Checked SET values affect subsequent statements without restart. Existing writers use their captured settings. Page size rejects zero, negative, nonnumeric and values above INT_MAX before assignment. |
| Format and rolling compatibility | Data-page/format versions, row-group policy and dictionary limit remain unchanged. Optional absent fields retain true/1048576 on new BEs; old BEs ignore the new fields and cannot implement the new controls. Defaults match the tagged Arrow 24 properties. |
| Thrift IDs | Read TQueryOptions on HEAD and live-verified branch-3.1, 4.0, 4.1 and 4.2. Added IDs 238/239 are unused on every release branch, optional, and have explicit defaults. The existing field237 mismatch between master and branch-4.1 predates this PR and is excluded from new findings. |
| Parallel paths | OUTFILE, EXPORT, Hive, Iceberg and native Parquet TVF writers receive the shared policy. Point-query and expression-only constant-folding paths were checked for relevance; no missing Parquet-writer sender was found. |
| Conditions and error handling | The index toggle is explicit; the documented Hadoop LZ4 branch preserves min(requested,131072). The positive-size assertion matches checked FE inputs and the nonzero Thrift default. No ignored Status or added exception-boundary issue was found. |
| Test coverage | Added tests cover index on/off, dictionary on/off, format versions, V1/V2 data pages, nullable/all-null values, metadata offset bounds, LZ4 target properties and Hive/Iceberg partition writers. FE tests cover valid/invalid bounds and map forwarding. SQL end-to-end and binary Thrift round-trip coverage are absent from the additions. |
| Expected test results | New counts, null counts and metadata expectations match the generated input by inspection. The FE test named ThriftSerialization constructs options; it does not execute a binary round trip. No golden output files changed. |
| Observability | Settings and output-file metadata expose the policy; existing error reporting remains. No new asynchronous lifecycle requires additional tracing or metrics. |
| Transactions and persistence | Generic annotated session persistence includes both primitive fields; missing saved keys retain defaults. EXPORT captures a deep clone and is cancelled on replay/failover. Transaction visibility, version and delete-bitmap paths are unchanged. |
| Writes, atomicity and crashes | File properties change within existing sink open/write/close and commit/abort protocols. No new ownership, crash-cleanup or atomicity defect was found. |
| FE-to-BE propagation | Both fields are set in common toThrift, marked needForward, copied through coordinators and RuntimeState, and consumed by common writer setup. Export worker contexts retain the captured session. |
| CPU and memory | Added setup work is constant per file and preserves the Arrow memory pool. Small and large page targets deliberately trade page overhead against buffering; size remains a target checked at batch boundaries, with Arrow's row limit retained. No concrete unintended performance regression was found. |
| Further recheck | Checked absent-index sequential fallback, page/header statistics, Iceberg split offsets, dictionary offsets, subclass overrides, export snapshots and extreme target handling. No unresolved static correctness candidate remains. |
BE header-hygiene review found no hub-header, PCH, explicit-instantiation, gate-table or source-.cpp test inclusion change. No new libc API or linker change is introduced.
Coverage is complete for the assigned static review. Builds, FE/BE tests, cluster SQL, mixed-version execution, external JVM-reader interoperability, stress tests and benchmarks were not run; the author's reported validation was not reproduced. These are validation limits, with no unresolved candidate withheld from the inline set.
Review converged after 2 round(s).
924060929
left a comment
There was a problem hiding this comment.
Parquet output currently uses shared writer defaults. This PR carries two session controls through TQueryOptions to the common writer, preserving default behavior and the Hadoop LZ4 page-size cap.
Independent static review of head 3b20906 found no actionable P0/P1/P2 defects within the FE scope and necessary FE/BE boundaries. Checked validation, SET_VAR restoration, FE forwarding, EXPORT session snapshots, coordinator transport, shared writer consumers, optional-field defaults, release-branch field IDs, and added tests. The implementation uses the appropriate shared abstractions.
APPROVE for the reviewed scope. No builds or tests were run. The supplied current-head snapshot reports successful P0/cloud regressions and FE/BE unit tests, but a failed FE coverage check; required-check rules are unavailable, so this is not a merge-readiness assertion. The existing automated review reports no actionable defects and agrees with this independent assessment.
Automated FE-focused static review (gpt-6.1-sol, high). No build or tests were run.
Describe the new Parquet output session controls in the English and Chinese current documentation: `enable_parquet_write_page_index` (default `true`) and `parquet_write_data_page_size` (default 1 MiB). Include an OUTFILE example, disabling/restoring the settings, Hive/Iceberg/EXPORT scope, the Hadoop-framed LZ4 page target cap, and tuning tradeoffs. Implementation: apache/doris#69971 Version scope: current/Dev only. These controls are newly introduced on master and are not available in released 4.x or 3.x, so their versioned pages are intentionally unchanged. Validation: both changed pages compile as Docusaurus-compatible MDX; `git diff --check` passes. Changed-link lint reports two existing `parquet_metadata_size_limit` anchor findings already present before this change; the new OUTFILE links resolve. I18n lint flags the intentionally current-only scope described above. A full website build was not run.
…berg WriteInfo (#70209) ### What problem does this PR solve? Issue Number: None Related PR: #69392, #69971 Problem Summary: **In short.** `doris_be_test` does not compile on master since #69971 was merged, so the BE UT of every PR fails with `BE BUILD FAIL`. This fixes the one test case that breaks it. **The problem.** #69392 replaced the `write_path`, `original_write_path` and `target_path` fields of `IPartitionWriterBase::WriteInfo` with one `IcebergOutputLocation location`, and updated the callers it knew about. #69971, merged after it, added `VParquetWriterTest.HiveAndIcebergParquetPageIndexOptions`, which still sets the old fields: ``` be/test/format/transformer/vparquet_writer_test.cpp:380:41: error: no matching constructor for initialization of 'VIcebergPartitionWriter' ``` Each PR built alone, so both were green. TeamCity's BE UT has failed this way for PRs merged with master `0eb5131db62` (for example build 1092024 of #69605). **How this PR fixes it.** The case builds its `WriteInfo` as the other Iceberg case in the same file does, `.location = IcebergOutputLocation(".", ".")`. Nothing else changes.
…/JSON/WAL fixes (#70185) ### What problem does this PR solve? Backport the following master PRs to `branch-4.2`, in master merge order: 1. #69672 — Preserve source values and alias semantics in ES scans. 2. #69971 — Add session controls for Parquet page indexes and data-page size. 3. #70155 — Repair ES source predicate regression cases. 4. #70079 — Fix ORC condition-cache seeks past filtered stripe suffixes. 5. #70154 — Preserve JSON and WAL rows with empty file projections. The ES changes are adapted to the existing 4.2 FE planner and BE source locations. Mapping safety, scan-wide read mode, local residuals, native `esquery` handling and alias routing retain the upstream behavior without introducing the master connector framework. Added adapter tests cover both scan protocols, aliases, missing-value negations and native residual rejection. Preserve existing branch-specific ES regression coverage. Bring in the previously absent predicate suite, adapting its plan assertions to 4.2's `LOCAL_PREDICATES` output and retaining LIMIT result checks. Parquet variables use the 4.2 annotation interface and the original optional Thrift field IDs. The ORC dependency is pinned to the same fixed commit as #70079. The ES implementation also preserves source numeric and JSONB predicate semantics after scan-wide fallback. Numeric-token rounding must not make a remote predicate discard a row matching the value Doris materializes; empty JSONB objects remain nonnull even when ES indexes no leaf. Docvalue eligibility and pushdown are retained. Mapped date formats and their order are carried per concrete backing index through the existing property map to both scan protocols. Calendar/epoch alternatives now distinguish basic_date from epoch_millis, for strings and source numeric tokens. Numeric docvalues and older FE numeric requests retain their epoch decoder. Typed alias selection consistently uses the requested mapping type in schema inference and planning. The pinned ORC decoder's libdeflate dependency is included on ARM, matching master. ### Release note Fix ES source-value filtering, mapped dates and typed alias query correctness, ORC condition-cache seek crashes/missing rows and its ARM link dependency, and JSON/WAL row counts for empty file projections. Add Parquet output page-index and data-page-size session controls. ### Validation - FE compilation and Checkstyle passed. ES validation: 81 tests (48 datasource/planner tests and 33 legacy ES tests), 0 failures/errors, 1 external-environment skip. The 9 Parquet session-variable tests passed. - Rebuilt the pinned ORC dependency under AddressSanitizer: 56 focused tests passed, including 32 filtered-stripe-suffix seek cases. - Compiled all 10 affected Doris C++ implementation/test translation units and the ORC fixture generator. The regenerated fixture is byte-for-byte identical to the committed fixture. - clang-format 16 checks passed for all affected Doris C++ sources and headers. Modified Groovy suites compiled successfully. - The ES reader/parser implementations and test translation units compiled. The shared DATETIMEV2 date-format algorithm passed 21 standalone ASAN checks. CMake dependency checks passed for aarch64, arm64 and x86_64; an actual ARM link was not run locally. - Added `test_es_source_review_cases.groovy` with SQL-to-SQL checks against an internal reference table for numeric/JSONB source predicates, LIMIT, epoch-only formats, and explicit legacy DATETIMEV2 basic_date columns. It covers both scanners and parallel-scroll settings, waits for legacy metadata readiness, and restores session settings. The suite compiled; no golden files were handwritten. - The applicable ES fixes are synchronized to master in #70205. Master already links libdeflate on every architecture. - Full Doris BE unit-test execution and live external SQL regression were not performed locally; CI validation is requested. ### Check List (For Author) - Test - [x] Unit Test - [x] Regression tests included - Behavior changed: - [x] Yes; the upstream behavior is backported to 4.2. - Does this need documentation? - [x] Parquet controls are documented by the upstream documentation PR: apache/doris-website#4581 ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label
…t stream closes early (#69996) ### What problem does this PR solve? Issue Number: None Related PR: #68630, #69945 Problem Summary: **Builds on #69945, now merged.** This branch is rebased onto master `0eb5131db62` and holds seven commits: the port; its first review fix, which keeps a route past the session's next request; two fixes from the second review, which bound the BE's FE calls on stream teardown and count the BE addresses of the routes in the registry bound; and three from the third review, which drop the routes of a GetFlightInfo that fails, cancel through those routes its queries that no deferred coordinator cancels, and have the BE ask the FEs the master reaches first. #### In short This ports the FE half of branch-4.x's #68630 to master. With #69945, an Arrow Flight SQL stream that the client closes or cancels before its end cancels its query only on the BE that serves the stream, and only when that BE also holds the stream's results. A query whose results are spread over several BEs keeps running on all the other BEs until it finishes or times out. With this PR the FE remembers, for each Flight query that leaves its results on the BEs, which BEs run it; the BE that sees the aborted stream asks the FE, through the new `FrontendService.cancelFlightQuery`, to cancel the query on every one of them. #### Background - A Flight SQL query leaves its result on the BEs. With parallel result sink (the default), each BE that runs the result fragment holds one result buffer and `GetFlightInfo` returns one endpoint for it; the client reads each endpoint with its own `DoGet` stream. - Since #67504 the FE closes the coordinator as soon as `GetFlightInfo` has returned (a query that still needs it, a batch-mode external-table scan or a remote Doris scan, is kept until the session's next request). After that, nothing on the FE cancels the query on behalf of an open stream. - A `DoGet` is served by `ArrowFlightBatchLocalReader` when the result buffer is on the same BE, or by `ArrowFlightBatchRemoteReader`, which pulls the blocks from the result BE with the `fetch_arrow_data` BRPC. - #69945 makes a reader that is closed, cancelled, fails or is destroyed before EOF cancel the query on its own BE when the buffer is local, and lets an aborting `cancel_plan_fragment` free the query's Flight buffers on the BE that receives it. #### The problem, and what it cost - **An abort on one endpoint stays on that BE.** A single-fragment query has no exchange between its BEs, so cancelling it on one BE does not reach the others, and the coordinator that could have sent them a cancel is already closed. When the client aborts one endpoint (a client-side `LIMIT`, a cancelled cursor, a dropped connection), the other BEs run their pipelines to the end and keep their unread results until the query's timeout or the delayed buffer cleanup; a result that does not fit in a buffer back-pressures the result sink until the query times out. - **A remote reader cannot cancel anything.** #69945 interrupts its pending fetch, but the query on the result BE keeps running. - **A local reader whose query context has expired** frees its own buffers but cannot tell the query's other BEs. #### How this PR fixes it - **A route per Flight query on the FE.** `FlightSqlQueryCancellation` maps each result id (the fragment instance id of an endpoint) to the query id and the BRPC addresses of all the query's BEs (`Coordinator.getBackendBrpcAddresses()`, from its per-BE tasks). `StmtExecutor` registers it when the query leaves its result on the BEs (`!isReturnResultFromLocal()`), before the coordinator is closed or deferred (`FlightSqlQueryCancellation.register(ConnectContext, Coordinator)`). The route belongs to no session. The client reads the results from the BEs, so it can still hold a stream of the query open when the session's next request begins or the session is torn down, and close it early afterwards. The BE also reports an abort from its `DoGet` thread, so even a client that closes a stream before it sends its next request can be overtaken by that request. A route goes when a cancellation through it succeeds, when the GetFlightInfo that registered it fails before answering with tickets, `execution_timeout + 5 s` after it was registered, or, oldest first and as a whole, when the registry would hold more than 100,000 result ids or 1,000,000 BE addresses. A route costs about 270 bytes plus about 30 bytes per BE address, and the result ids of a query share it, so the registry stays within about 55 MB however many BEs a query runs on. Without the session as a bound, these caps keep the registry from growing with the query rate times the timeout; a query whose route was pushed out ends at its timeout, as before this PR. The registry is an insertion-ordered map under a lock, and the cancellation RPCs are sent outside it. - **`cancelFlightQuery(result_id)`, a new FrontendService RPC.** It answers NOT_FOUND when the FE has no route for the id. Otherwise it sends the existing `cancel_plan_fragment` to every BE of the query, waits at most 1 s in total for their answers, and returns OK only when all of them succeeded; on any failure the route stays, so that the caller can retry. `cancel_plan_fragment` is understood by older BEs and runs on the light work pool, not on the Flight read pool, so it also gets through when the Flight pool is saturated or shut down. - **A GetFlightInfo that fails cancels its query.** A GetFlightInfo can fail after its query ran, at the Arrow schema fetch or because a prepared statement's result schema no longer matches; no client can pull the results then. A deferred query is cancelled through its coordinator, which is still open, as before. Any other query has closed its coordinator, and nothing would cancel it before the BE's result buffer timer (`execution_timeout + 5 s`): its route now sends the cancellation to every BE of the query, without waiting for the answers, and the request's routes go. The prepared-statement check cancels its query through the executor and only drops the route. A request that fails before it begins, such as an empty query, finds the previous request's endpoints on the session and leaves their routes. - **The BE reports every abort.** After the local cleanup of #69945, `ArrowFlightBatchReaderBase::close()` calls `cancelFlightQuery` on each running FE in turn, first the FEs the master reaches and then those it reports with process UUID 0. OK ends the loop; NOT_FOUND (an FE that did not plan the query) moves on to the next FE; any other failure is retried once, and the transport is reopened after a thrift error. These calls use FE connections of their own (`ExecEnv::flight_cancel_frontend_client_cache`, at most two kept per FE), all opened with a 2 s timeout, and acquire them without backing off; an FE that cannot be connected to is not retried. A stream read to EOF never calls the FE. - The thrift method is appended to `FrontendService` with the same name, signature and comment as on branch-4.1 and branch-4.2. | Situation | Before (master with #69945) | After | |---|---|---| | Client aborts one endpoint of a query whose results are on several BEs | Only the BE holding that endpoint cancels the query; the other BEs run to the end and keep their unread results until the timeout or the delayed cleanup | The query is cancelled on every BE of the query | | Client aborts a stream served by a remote reader | The pending fetch is interrupted; the query keeps running on the result BE | The query is cancelled on the result BE and on all other BEs | | Client aborts a local stream after its query context expired | Only the local buffers are freed | The query's other BEs are cancelled too | | FE that did not plan the query is asked | — | Answers NOT_FOUND; the BE asks the next FE | | Stream read to EOF, then closed | Nothing cancelled | Nothing cancelled; the FE is not called | **Upgrades and mixed versions.** Both the FE that planned the query and the BE that serves the stream need this PR. | FE | Result BE | Effect of an abort | |---|---|---| | Without this PR | any | The BE gets an unknown-method error from `cancelFlightQuery`, logs a warning for that FE, and only the local cleanup of #69945 applies | | With this PR | With #69945 | The query is cancelled and its Flight buffers are freed on every BE | | With this PR | Without #69945 | The query's fragments are cancelled; that BE keeps its result buffer until its usual timeout | **Cost.** The FE calls run on the `DoGet` thread, including from the reader's destructor, after the local cleanup of #69945. A stopped FE stays on the BEs' list until it is dropped, reported with process UUID 0, and the FEs the master reaches are asked first, so a stopped FE delays an early close only when no reachable FE holds the route (the route expired or was pushed out, or the planning FE is itself unreachable): by about 0.1 s when it refuses connections, 3.1 s when it does not answer the connect (`thrift_connect_timeout_seconds`), and 4 s when it accepts the connection and does not answer. An FE that hangs while the master still reaches it costs up to 4 s until the master's heartbeat to it fails. A GetFlightInfo that fails sends its cancellations without waiting for them. On the FE, `cancelFlightQuery` holds one thrift thread for at most 1 s, and each idle connection a BE keeps for these calls holds another. The route keeps only ids and addresses, not the coordinator, its scan state or its query queue slot, and the registry holds at most 100,000 result ids and 1,000,000 BE addresses, about 55 MB. Differences from branch-4.x: the route is registered in master's `!isReturnResultFromLocal()` branch (#67900) instead of the `ARROW_FLIGHT_SQL` connect type branch, before the `mustOutliveDispatch()` deferral, so deferred queries are routed as well; a route does not belong to the session: branch-4.x drops it when the session's next request begins and when the session is torn down (`FlightSqlChannel.reset()`), so an abort reported after either finds no route and the other BEs run until the timeout, while here a route stays until its cancellation succeeds or it expires, and the registry is bounded instead; the BE reader includes `runtime/frontend_info.h` itself, because `exec_env.h` no longer includes it (#66400); the BE test reads and restores `ExecEnv::_frontends` through its `unique_ptr`; the FE test is JUnit 5 and tests that a route outlives the session's next request and its teardown, and the bound; the regression suite keeps its table at the end, as AGENTS.md asks; the two branches of the BE's FE loop got comments; the BE asks the FEs the master reaches first, where branch-4.x asks them in address order; and a GetFlightInfo that fails cancels through their routes its queries that were not deferred, where branch-4.x only finalizes the deferred executors and cancels nothing. #### Results - FE UT `FlightSqlQueryCancellationTest` (9 tests, new): a cancellation reaches every BE of the route after the coordinator and the selected endpoint's fragment are gone, and a successful one removes the route for all of its result ids; a BE that answers an error keeps the route, and the retry succeeds; routes expire `execution_timeout + 5 s` after registration; a route registered from a session survives the session's next request (`beginRequest()`) and its teardown (`releaseProtocolSession()`) and still cancels; the bound drops whole routes, oldest first, also when the BE addresses exceed it; a route whose result id a newer registration took over releases its addresses; an expired route leaves at the next registration; a request that fails before answering with tickets drops its routes as a whole, and cancels the queries no deferred coordinator cancelled on all their BEs without waiting for them. - `DorisFlightSqlProducerTest`: a GetFlightInfo whose schema fetch fails cancels its query on both its BEs and drops its route; a deferred query is cancelled once, through its coordinator; an empty query leaves the previous request's route and cancels nothing. `DorisFlightSqlSchemaTest#executionSchemaDriftExpiresHandleAndCleansResults` now also requires the route of a prepared statement whose result schema changed to go. - `StmtExecutorTest#testCloudReplanDispatchProfileLifecycle` now checks, for its two Flight outcomes (closed and deferred coordinator), that the dispatched query registered its route; its coordinator mock returns the query id and one BE address, and its `exec()` adds one endpoint, as the coordinator does. - BE UT `ArrowFlightRemoteCancelTest` gets the FE half of branch-4.x's fixture back: an in-process thrift FE (`FlightCancelCoordinator`) that answers `cancelFlightQuery` by sending `cancel_plan_fragment` to an in-process BRPC result BE. The 9 new tests: a remote reader's close reaches the result BE; the cancellation also works when the Flight work pool rejects work; an FE error is retried once; an older result BE that only understands query cancellation gets it and keeps its buffer; a local reader whose query context has expired still reports the abort; a stream read to EOF does not call the FE; a close is not held up by a 60 s transport that another caller left in the shared FE cache to an FE whose first answer stalls, moves past an FE that refuses connections, and asks an FE that accepts connections and never answers, reported with process UUID 0 and sorting first, only after the planning FE (14 ms; 4.1 s in address order). `CancellationInterruptsPendingBrpcFetch` and `FetchAfterCancellationStillCompletesRpc` are back to branch-4.x's form, which needs the FE route (#69945 carried variants without it). - 28 Flight session and coordinator FE test classes (297 tests) pass, with Checkstyle. The 4 BE suites (`ArrowFlightCancelTest`, `ArrowFlightRemoteCancelTest`, `ResultBufferMgrTest`, `ArrowResultBlockBufferTest`, 30 tests) pass 10 times in a row in one ASAN process. - Mutations, each red in its target tests: on the FE, a failed cancellation drops the route; a successful one keeps it; routes never expire; `StmtExecutor` does not register; and, for the review fix, the session drops its routes again at its next request and teardown; the bound evicts the route just registered instead of the oldest one, or single result ids instead of whole routes; an expired route can still be cancelled; registration keeps expired routes. On the BE, the reader stops calling the FEs (the 7 tests that need the route turn red, the other 11 stay green); the reader does not retry. For the second review's fixes: on the BE, taking the connections from the shared cache and acquiring them with the default backoff (one round) turn the two new tests red, each its own (the close took 5.0 s and 7.4 s); with the reader as it was before these fixes they took 5.0 s and 14.7 s. On the FE, not releasing a route's addresses, releasing them per result id instead of with the last one, leaving the address bound out of the eviction, and keeping the addresses of the route an id leaves when a newer registration takes it over each turn their target test red. That an FE which cannot be connected to gets no second attempt has no test of its own: against an FE that refuses connections the second attempt costs about 0.1 s, and the difference only shows with an FE that does not answer the connect (3.1 s instead of 6.2 s). For the third review's fixes: on the FE, dropping the routes whether or not the request has begun, dropping single result ids instead of whole routes, cancelling deferred queries through their routes too, dropping the routes without cancelling, not handling the failure at all, waiting for the BEs' answers, and leaving the prepared-statement branch's route each turn their target tests red; on the BE, asking the FEs in address order turns the new test red (4.1 s). - On a local single-BE cluster, `arrow_flight_sql_p0/test_flight_cancel_cleanup` (new; it aborts one endpoint after the first batch, by closing it, by an explicit cancel, and by closing it after the session ran its next request, and each time requires the query's pipelines to disappear from every BE within 20 s) passes, and the BE log shows the `cancel_plan_fragment` that the FE sent through the route for all three aborts. Before the review fix it showed it for one of the three: the third abort found no route, and so did the first, whose report came after the suite's next request (its first attempt met a stale connection after an FE restart; the retry reopened it and found no route). The other 20 `arrow_flight_sql_p0` suites and the 14 `external_table_p0/remote_doris` suites pass. A single BE cannot show the cross-BE effect: there the BE serving the stream already cancels the query itself (#69945), so the suite passes without this PR too; on several BEs it needs this PR. Locally the cross-BE path is covered by the BE UT's in-process FE and remote result BE. - Rebased onto master `0eb5131db62`, after #69830 removed `NereidsCoordinator` and made its implementation the `Coordinator`: `getBackendBrpcAddresses()` is now a method of that class, with the body of the former `NereidsCoordinator` override (the legacy implementation went with the old class). `git range-diff` shows no other change to the first commit and none to the second. The FE and BE tests above ran on this base; master's `doris_be_test` does not build since #69971 (`vparquet_writer_test.cpp`), so the BE UT here ran with that test's one-line fix (#70209) applied locally. The regression suites were not rerun on this base, including the `arrow_flight_sql_p0` suites master added since `1adeb3a6801`. Co-authored-by: Gabriel <liwenqiang@selectdb.com>
What problem does this PR solve?
Parquet output relies on implicit page-index and data-page-size defaults, so users cannot explicitly omit indexes or tune the target page size.
Add two validated session variables shared by OUTFILE, EXPORT, Hive and Iceberg Parquet writers:
enable_parquet_write_page_index: write ColumnIndex/OffsetIndex metadata; defaults totrue, preserving the current master behavior.parquet_write_data_page_size: target uncompressed data-page size in bytes; defaults to1048576, accepts positive 32-bit integers, and applies with indexes enabled or disabled.Keep the existing 128 KiB target cap for Hadoop-framed LZ4. Other codecs use the requested target. Row-group size, dictionary-page size, and data-page/format versions are unchanged. Optional query fields preserve existing defaults when omitted by older FEs.
Release note
Add session controls for Parquet page-index output and target data-page size.
Validation
Check List (For Author)
Check List (For Reviewer who merge this PR)