Repository navigation
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
09fb60b to
04bc396
Compare
|
/review |
There was a problem hiding this comment.
Review status
COMPLETE static review of PR #68853 at head 04bc39642665a04901cbacae6dbf8420c11e0014 against base 8d0eacd574c37c45f8bc8ad99f053e9ec8b564bb. I reviewed the authoritative 227-path diff, relevant upstream/downstream paths, added tests and fixtures, existing threads, and three convergence rounds. Five distinct new inline findings remain: one P1 JSON load row-integrity issue and four P2 S3/optimizer issues. There are no existing inline threads or user focus points to carry forward. All suspicious candidates have been accepted, deduplicated, or dismissed; convergence is complete.
Critical checkpoints
- Goal and proof: The six-field FILE type is wired through FE/BE planning, casts/functions, wire formats, ORC/Arrow output, JSON input, and S3 TO_FILE/LIST_FILE. The added tests provide static oracles for many valid and invalid values, but the five inline cases show the feature is not fully correct. Builds and tests were prohibited by this review contract, so none were run.
- Scope and reuse: The broad changes are feature-related and generally reuse struct/nullable, SerDe, TVF, and resource patterns. I found no unrelated change to call out.
- Concurrency and locks: TO_FILE pins the selected filesystem while a mutex protects bucket switching; remote HEAD runs outside that lock. Query resource snapshots, LIST_FILE pagination/cancellation, and column copy-on-write were traced; no separate race, lock-order, or deadlock issue was substantiated.
- Lifecycle and memory: Query-owned resources and filesystem pointers have bounded lifetimes; six-child ColumnFile/VARBINARY arena ownership remains aligned across filter, cache, spill, and transport paths. I found no shared-pointer cycle, orphan allocation, or cross-translation-unit static initialization dependency.
- Configuration: FILE transport is gated by BE execution version 17. No new dynamic configuration item requires propagation; the new
recursiveTVF option has an Azure-provider semantics defect (inline finding). - Compatibility and storage: Touched Thrift/Protobuf values and field IDs were compared with branch-3.1, 4.0, 4.1, 4.2, and master; no reused ID or incompatible existing-struct field was found. FE/BE six-child FILE encoders/decoders and old-version gates agree in the inspected paths. ORC sparse-child and nested-null compatibility were checked in both reader paths.
- Parallel paths, conditions, and error handling: v1/v2 JSON, both ORC readers, Arrow, CSV, Parquet, S3 listing, and HEAD were traced. Strict v1 JSON FILE failure does not roll back an earlier field from the row (P1); the other inspected malformed-value paths return errors or preserve alignment. LIST_FILE raw-key and Azure depth conditions have separate P2 findings.
- Tests and results: Added BE/FE unit tests, regression suites, ORC fixtures, and expected outputs were inspected, not executed. The strict top-level invalid FILE, special S3 key round trip, Azure nonrecursive depth, non-null FILE literal cost, and negated FILE null-stat cases lack effective coverage.
- Observability: Existing status/error counters and logs cover direct FILE validation and S3 failures; I found no separate logging or metric defect. The JSON row-integrity path needs an atomic rejection as described inline.
- Transactions, persistence, and writes: FE catalog/Gson/Column persistence was checked; no EditLog, visible-version, delete-bitmap, or transaction protocol change is introduced. JSON load row atomicity is broken by the P1 finding; other inspected FILE writes validate before publishing output.
- FE/BE variables: Checked S3 resources flow through coordinator, alternate fragment builder, and direct load planner into BE query context; no missing send path was established.
- Performance and remaining issues: Non-null FILE literal size/numeric statistics and negated FILE null Boolean statistics produce the two P2 costing findings. No other demonstrated hot-path regression or unresolved candidate remains.
|
/review |
|
run buildall |
There was a problem hiding this comment.
Review execution on 326d74e175bfadcae63285bf4226c291214e09a6 is incomplete for convergence: a new valuable finding appeared in the third and final permitted review round. The 228 changed paths and all candidate points were swept, and the four confirmed new P2 issues are inline. This was a static review only; no builds or tests were run.
Critical checkpoints
- Goal and scope: The PR adds a six-field FILE value through FE/BE expressions, transport, external ORC, TO_FILE, and LIST_FILE. The changes are broad but feature related. The implementation does not fully deliver consistent URI and metadata behavior because of the four inline issues.
- Concurrency and lifecycle: Query-scoped S3 resource snapshots are immutable; TO_FILE shares fragment state across clones, locks filesystem switching, and performs remote HEAD outside the lock. Ownership and close paths showed no additional supported race, deadlock, or retention issue.
- Configuration and compatibility: The fixed FILE execution-version gate is 17. New thrift fields are optional; touched thrift/protobuf IDs were compared with release branches, and FE/BE format gates were checked. No separate rolling-upgrade or dynamic-configuration defect was substantiated.
- Parallel paths and conditions: Both ORC readers, sparse/nullable projections, JSON and block transport, CSV/Parquet/Arrow boundaries, S3 and Azure clients, and legacy/New Planner/stream-load resource senders were traced. The supported gaps are the four URI/metadata cases in the inline comments.
- Tests and results: Changed BE and FE unit tests, regression suites, and expected outputs cover principal FILE operations, error handling, and transport. They lack the raw-key MIME, Azure HEAD/list ETag, and HTTP(S) LIST_FILE cases reported here. Their runtime results were not verified because execution was prohibited.
- Observability, persistence, and writes: Remote failures and cancellation have status paths; no separate observability issue was supported. Internal FILE columns are gated; FE persistence/replay and external ORC output were inspected. No distinct transaction, crash-atomicity, or write-path defect was substantiated.
- FE/BE variables and performance: The S3 resource map is sent on the reviewed coordinator, distributed-planner, and stream-load paths. Remote HEAD remains per row, while client switching is lock scoped and LIST_FILE is paged; no separate actionable performance issue was substantiated.
- Other findings and existing threads: The two existing P2 statistics issues (non-null FILE literal size and
IS NOT NULLrange) still apply and are not reposted. The existing raw-key lookup and Azure nonrecursive LIST_FILE P2s are fixed. The existing JSON P1 describes anOK/valid=falsecontinuation that no longer occurs: strict FILE deserialization errors propagate throughRETURN_IF_ERROR, so its ID is not carried as a blocking comment. There was no additional user-provided focus.
The three-round cap ended with the Azure LIST_FILE ETag finding in round three, so this review does not claim full convergence. All four supported issues found within the permitted rounds are included below.
| const auto stat_status = filesystem->stat(uri, &metadata, &state->stat_context); | ||
| if (context->state()) RETURN_IF_CANCELLED(context->state()); | ||
| RETURN_IF_ERROR(stat_status); | ||
| auto content_type = to_file_content_type(uri, metadata); |
There was a problem hiding this comment.
[P2] Populate Azure HEAD metadata before constructing the FILE value. For an S3_PROVIDER=AZURE resource, AzureObjStorageClient::head_object reads BlobProperties but returns only BlobSize. This TO_FILE path then guesses content_type from the suffix and leaves checksum NULL even when the blob has explicit Content-Type and ETag; for example, payload.bin stored as text/csv becomes application/octet-stream. Pass those properties through ObjStorageHeadResult and cover an Azure blob whose declared type differs from its name.
TPC-H: Total hot run time: 28946 ms |
TPC-DS: Total hot run time: 152194 ms |
ClickBench: Total hot run time: 25.59 s |
FE Regression Coverage ReportIncrement line coverage |
|
/review |
|
run buildall |
There was a problem hiding this comment.
Review complete for 3647cb947a5e7c465fdfb664467300f7299edeee (static only). No new inline findings. The existing P2 threads on FILE literal and IS NOT NULL statistics remain applicable and are not duplicated. The earlier P1 JSON row rollback thread does not apply to this head: the FILE-specific success-with-invalid-row branch is gone, and invalid FILE decoding now propagates an error rather than continuing with a partially appended row. No existing P0/P1 blocker remains applicable.
Critical checkpoints:
- Goal and proof: The change adds a six-field FILE value through FE/BE types, wire transport, TO_FILE, LIST_FILE, casts, field access, and EXPLODE_FILE. The added BE/FE unit cases and regression suites exercise those paths, including invalid values and resource access. Their execution was prohibited for this review, so this is a static conclusion.
- Scope and clarity: The 185 changed paths stay within the FILE feature, supporting object metadata and version transport, and their tests. No unrelated change was identified.
- Concurrency: TO_FILE protects lazy filesystem creation with a mutex and performs remote HEAD outside that lock. Query resources are collected per execution; LIST_FILE uses one generator task and streamed pages. No unprotected shared mutation or lock-order issue was substantiated.
- Lifecycle and initialization: Per-statement resource snapshots reach the first BE query context through every fragment construction path; TO_FILE pins the filesystem across HEAD and checks cancellation. No new cross-translation-unit static initialization dependency, ownership cycle, or unreleased handle was found.
- Configuration: The FE max BE execution version advances to the immutable FILE minimum, version 17. No dynamic configuration behavior is introduced.
- Compatibility and wire IDs: The touched Thrift/protobuf definitions were compared with release branches 3.1, 4.0, 4.1 and 4.2; no reused field or enum ID or new required field was found. FILE transport, constant values, cache/spill serialization, and version gating were traced for rolling upgrades.
- Parallel paths and conditions: Legacy coordinator, Nereids, and stream-load fragment paths all forward S3 resources. FE DDL and SQL key/function gates, nullable/constant casts, nested pruning, BE format readers, OUTFILE restrictions, and S3/Azure listing paths were checked; no distinct missed branch was substantiated.
- Test coverage and results: Inspected positive, negative, nullable, raw-key, pagination, authorization, cache, spill, format, and persistence cases plus their expected-output files. The test outcomes and generated files were not runtime-validated in this review; no build or test was run.
- Observability: New remote and conversion failures propagate contextual Status errors; existing query diagnostics are sufficient for the reviewed paths. No missing critical metric or excessive new INFO logging was identified.
- Persistence, transactions, and writes: FE FILE type/literal persistence registration and replay were reviewed. FILE storage and unsupported write/format routes are gated; this PR adds no transactional FILE write path or EditLog mutation.
- FE/BE state and performance: The resource map and FILE expression/type descriptors reach all reviewed FE/BE send paths. Listing is paginated, advances empty pages, and honors LIMIT before another fetch; no concrete CPU or memory regression was found.
- Other issues and focus: The supplied focus file contained no extra focus. All five review scans returned
NO_NEW_VALUABLE_FINDINGS; the one apparent nested-cast pruning concern was refuted by recursive type-change checking. Final changed-path and candidate sweep is complete with no unresolved point.
TPC-H: Total hot run time: 28840 ms |
TPC-DS: Total hot run time: 151200 ms |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
ClickBench: Total hot run time: 24.34 s |
|
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. |
FE UT Coverage ReportIncrement line coverage |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
There was a problem hiding this comment.
Review status
Completed static review of PR #68853 at head afcc2850b3f7ab7a21412d1b9193ecca93d501ea against base 380912cc7344e92375c3de58ec37c99602cad013. No new inline finding is reported. The full changed-file set, authoritative diff, existing review threads, five risk focuses, and delegated review sections were rechecked. The review converged in round 1.
Critical checkpoints
- Scope and goal: The FILE feature was traced across the six-child BE column/value/SerDe implementation, FE and Nereids types, TO_FILE and FL_GET_BINARY, LIST_FILES/EXPLODE_FILE, resource propagation, object-storage metadata, query cache/spill, and FE/BE wire descriptors. The changes remain feature-scoped.
- Correctness: Parent and child null handling, filtering, constants, validation, JSON/PB transport, aggregate state, cache/spill paths, and result serialization were inspected. The regular JSON partial-object behavior is intentional and covered by
FormatInputMatchesNamesAndFillsMissingOptionalFields; the JSONB six-field requirement is a separate strict cast contract. - Analysis and operator guards: FILE casts, element access, grouping/order/set/window/distinct restrictions, nested pruning, Arrow/OUTFILE boundaries, and comparison coercion were checked. The proposed join/filter comparison concern is dismissed because
supportCompare(..., false)rejects FILE before legacy translation. - Resources and lifecycle: TO_FILE resource snapshots, prepared/routine/broker handoffs, filesystem bucket switching, cancellation, LIST_FILES pagination, output slot mapping, and Azure/S3 provider paths were reviewed. Existing resource, raw-key, MIME, Azure metadata, and aggregate-state P2 threads cover the remaining known issues; no distinct new race or lifecycle defect was found.
- Compatibility: Thrift/protobuf ids, FILE six-child descriptors, optional fragment/list fields, FE/BE factories, and release snapshots (3.1, 4.0, 4.1, 4.2, master) were compared. No reused id, changed meaning, or new blocking protocol incompatibility was substantiated.
- Existing blockers: Existing P1
4242705286targets the removed legacybe/src/format/json/new_json_reader.cpppath, and existing P14282867982is fixed by the currentTYPE_FILEVCase dispatcher arm. Neither remains applicable, so no blocking ids are carried forward. - Tests and validation: Added BE/FE unit tests, regression suites, expected outputs, and fixtures were inspected statically. Builds, tests, benchmarks, formatters, and runtime validation were not run under this review contract.
- User focus:
review_focus.txtcontains no additional focus. No unresolved candidate or coverage gap remains after the final changed-file and risk sweep.
Review converged after 1 round(s).
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
| public int hashCode() { | ||
| return FileType.class.hashCode(); | ||
| } |
There was a problem hiding this comment.
What is the purpose of having different hashcodes for two FileType instances?
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: FILE adds persistence hooks, scalar type guards and analysis branches that are unnecessary for supported usage or duplicate shared checks. Remove these guards, redundant column-schema validation and the associated tests. Handle unsupported FILE output in Arrow type mapping, use shared DISTINCT and generator alias checks, and align FILE DDL error messages with other types. ### Release note EXPLODE_FILE uses the standard generator alias rules. Unsupported FILE Arrow output is rejected during Arrow schema mapping. ### Check List (For Author) - Test: Manual test: reviewed staged changes; git diff --cached --check, Checkstyle 9.3 with repository rules on the staged Java files, and build-support/check-build-hygiene.sh passed. Unit and regression tests were not rerun for this commit-grouping task. Full Maven validate was blocked by missing local SNAPSHOT artifacts; BE format checking requires unavailable clang-format 16. - Behavior changed: Yes; remove unsupported-metadata guards, use common alias and DISTINCT validation, and report FILE Arrow rejection at the mapping boundary. - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: FILE uses bounded VARCHAR fields for uri, content_type and checksum, introducing arbitrary limits and extra BE compatibility handling when block metadata represents them as STRING. Use STRING consistently in FE and BE, validate descriptors against that canonical schema, and update MySQL display metadata. Update type tests and cover serialization of a URI longer than 65533 bytes. ### Release note FILE uri, content_type and checksum fields use STRING instead of bounded VARCHAR. ### Check List (For Author) - Test: Manual test: reviewed staged changes; git diff --cached --check, Checkstyle 9.3 with repository rules on modified Java files, and build-support/check-build-hygiene.sh passed. Unit and regression tests were not rerun for this commit-grouping task. Full Maven validate was blocked by missing local SNAPSHOT artifacts; BE format checking requires unavailable clang-format 16. - Behavior changed: Yes; FILE text fields use STRING and expose updated type and MySQL display metadata. - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Query-local FILE S3 resource snapshots are stored in ConnectContext and manually cleared when an execution starts. Move registration and snapshot ownership into PlanTranslatorContext, share that snapshot between TO_FILE and LIST_FILES scans, and pass resources through NereidsPlanner and CoordinatorContext to pipeline parameters. Remove unused stream-load plumbing and replace connection-scoped tests with plan-scoped snapshot and translation tests. ### Release note None ### Check List (For Author) - Test: Manual test: reviewed staged changes; git diff --cached --check and Checkstyle 9.3 with repository rules on modified Java files passed. Unit and regression tests were not rerun for this commit-grouping task. Full Maven validate was blocked by missing local SNAPSHOT artifacts. - Behavior changed: No; preserve shared snapshots within a plan and refresh them for the next plan while removing connection-scoped resource state. - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#68853 Problem Summary: Keep FILE column restrictions in ColumnDefinition, with column and type context in errors. Reuse the existing table and asynchronous MV column validation paths, remove FILE-specific MV and distribution guards, and let IN use its existing complex-type legality checks. Remove the FILE-specific AGG_STATE restriction from general data type validation so query types remain separate from column storage restrictions. ### Release note FILE column validation errors include the column name, actual type, and storage restriction. ### Check List (For Author) - Test: Checkstyle and git diff --check passed. Compilation and tests were not run at the user's request. - Behavior changed: Yes, column errors include context and general type validation no longer rejects FILE-containing aggregate-state types. - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Explicit FILE casts still accept NULL and identical types, including nested FILE containers, despite FILE casts being unsupported. Reject these casts in CheckCast so CAST and TRY_CAST cannot bypass the restriction. Construct FILE-valued test fixtures with TO_FILE(resource, NULL). Update expression, constant-folding, DDL and regression coverage to exercise the intended boundaries. Create test resources through the existing SQL test helper instead of calling protected setters. ### Release note CAST and TRY_CAST involving FILE or containers containing FILE reject NULL and identity casts. TO_FILE(resource, NULL) remains supported. ### Check List (For Author) - Test: Validated the combined branch with an FE build, 42 passing tests in FileTypeExpressionTest and FileTypeDdlTest, and passing regression suites test_file_type_internal_disabled and test_modify_struct. git diff --check passed. - Behavior changed: Yes; reject every explicit FILE cast, including NULL, identity casts and nested containers. - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Expression.checkInputDataTypes invokes a FILE-specific post-check whose dispatcher enumerates InSubquery and WindowExpression. This couples generic expression validation to individual FILE cases. Restore the ordinary validation flow and move the existing checks into each expression's checkInputDataTypesInternal override. Reuse checkFileKey and remove the special instanceof dispatcher while preserving recursive validation, error order and messages. Add coverage for both IN operands, nested FILE types, window partition and order keys, recursive aliases and valid FILE-valued window results. ### Release note None ### Check List (For Author) - Test: Checkstyle 9.3 with repository rules on all five changed Java files and git diff --cached --check passed. FE production and test compilation completed. Ran run-fe-ut.sh --run FileKeyInputTypeTest,FileTypeExpressionTest,ExtractAndNormalizeWindowExpressionTest: FileKeyInputTypeTest passed 4 tests and ExtractAndNormalizeWindowExpressionTest passed 3 tests. FileTypeExpressionTest failed during TestWithFeService.beforeAll because HTTP server port allocation failed, before its test cases ran; the overall test command therefore exited with a failure. Regression suites were not run. - Behavior changed: No; preserve FILE key restrictions and existing diagnostics through the expression-specific validation hooks. - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#68853 Problem Summary: Keep FILE column restrictions in ColumnDefinition, with column and type context in errors. Reuse the existing table and asynchronous MV column validation paths, remove FILE-specific MV and distribution guards, and let IN use its existing complex-type legality checks. Remove the FILE-specific AGG_STATE restriction from general data type validation so query types remain separate from column storage restrictions. ### Release note FILE column validation errors include the column name, actual type, and storage restriction. ### Check List (For Author) - Test: FE build, 42 tests in FileTypeExpressionTest and FileTypeDdlTest, and regression suites test_file_type_internal_disabled and test_modify_struct passed on the combined branch. git diff --check passed. - Behavior changed: Yes, column errors include context and general type validation no longer rejects FILE-containing aggregate-state types. - Does this need documentation: No
|
/review |
There was a problem hiding this comment.
Review of head 003ed3a: two new verified findings, P1 FILE descriptor incompatibility during upgrades and P2 missing S3 resources on first stream/routine-load execution. The P1 needs correction before merge. Findings are supported by static producer/consumer traces; no builds, tests, benchmarks, or runtime provider/upgrade checks were executed.
The affected load flow is an ordinary scalar projection, so the FILE table-column prohibition does not prevent it:
OlapTableSink(file_size BIGINT)
LoadProject(file_size := ELEMENT_AT(TO_FILE('res', uri), 'size'))
LoadScan(uri STRING)
Critical checkpoint conclusions:
- Goal and behavior: independent six-field query FILE values, metadata producers, JSON results, and nested value transport are integrated; the two inline findings identify incomplete load and upgrade behavior. Current explicit FILE casts are deliberately rejected.
- Scope and reuse: the cross-module scope follows the type integration; fixed-schema helpers, shared field projection, and shared metadata/ETag conversion provide reuse. No further scope defect was established.
- Concurrency and locks: resource copying uses the resource read lock; shared TO_FILE client/bucket changes use a mutex, with each remote stat outside it while retaining a shared filesystem. No additional race or lock inversion was found.
- Lifecycle and static initialization: query-map alias ownership, RuntimeState/FunctionContext clone lifetime, column COW, and explode input cleanup were traced. New constant tables do not introduce a cross-TU initialization dependency.
- Configuration: no new operator configuration item; normal SQL captures current resource properties during translation. Lazy client creation preserves NULL-URI behavior.
- Incompatible changes: P1 changes already-supported branch-4.1 FILE child descriptors from VARCHAR to STRING without compatible readers/writers or a capability gate; both upgrade orders fail.
- Thrift/protobuf allocation: all touched definitions were compared with branches 3.1, 4.0, 4.1, and 4.2. New numbers are unused or identical and existing structs gain optional members; matching ids do not cure the P1 child-schema mismatch.
- Parallel paths: normal SQL, point-query fallback, prepared execution, S3/Azure, direct/recursive listing, and load entry points were checked. P2 is confined to the new first-execution stream/routine omission; the existing broker handoff issue is suppressed.
- Conditional checks and errors: canonical child schemas, constant selectors, locator/range/metadata validation, cancellation, and output-format rejection have concrete failure paths. Deliberate unsupported direct-aggregate/Python/Arrow boundaries are not new findings.
- Test coverage: inspected all changed BE/FE unit tests and regression suites, including null/empty/binary, malformed input, nested/constant/COW, metadata, pagination/LIMIT, cancellation, and concurrency cases. The load-map and mixed-version descriptor cases need coverage with their fixes.
- Expected results: inspected changed outputs against suite SQL and ordering/count expectations; no additional incorrect result was established. Test execution and output-generation provenance were not verified.
- Observability: metadata requests retain existing latency/rate-limit instrumentation and provider/path errors; no additional observability defect was established.
- Persistence and transactions: both Gson registries include FILE. This change adds no transaction journal transition; table FILE storage is prohibited. No new visible-version/delete-bitmap mechanism is involved.
- Writes and atomicity: new remote operations read metadata; expression errors avoid publishing partial results. Existing scalar transactional loads are affected by the P2 setup failure.
- FE/BE variable passing: normal SQL carries resources through pipeline parameters to QueryContext; direct stream/routine planning drops its collector-local map. This is the P2 finding.
- Performance: listing retains one provider page and the current batch; metadata getters share selected storage. Previously reported getter/constant-concat copy concerns are suppressed.
- Further issues and coverage limits: all 158 changed paths and initial risk items received complete-review and integration coverage; candidates were accepted, dismissed with evidence, or deduplicated. No unresolved static-review question remains after the final round. Runtime correctness, mixed-version execution, and test success remain unexecuted validation limits.
Existing context: all 60 current inline comments and replies were checked. The old CASE P1 is fixed by the TYPE_FILE dispatcher arm; the old strict FILE JSON-input P1 path is absent and native FILE table input is disabled. Neither is independently confirmed as an existing blocker. Known P2 issues, including broker resource handoff, escaped aggregate-state metadata and mixed-inline copying, are not reposted. The new load finding requires neither credential rotation nor cached-plan reuse; the new compatibility finding concerns actual descriptor interpretation, beyond the earlier VARCHAR/STRING design question. No additional user focus was supplied.
Review converged after 3 round(s).
| } | ||
| if (node.type == TTypeNodeType::FILE) { | ||
| constexpr TPrimitiveType::type child_types[] = { | ||
| TPrimitiveType::STRING, TPrimitiveType::BIGINT, TPrimitiveType::BIGINT, |
There was a problem hiding this comment.
[P1] Preserve the FILE child schema during rolling upgrades
branch-4.1 already supports these FILE ids, but its FileType.canonicalFields() emits VARCHAR(65533) for uri and VARCHAR(1024) for content_type/checksum. This validation and its protobuf counterpart require STRING, so a 4.1 FE's TO_FILE/list_files plan fails on an upgraded BE with FILE requires its canonical scalar children. Upgrading FE first also fails because current FileType emits STRING while the 4.1 BE requires VARCHAR. Retain a compatible writer schema or capability-gate the change, normalize both representations on read, and cover both upgrade orders.
|
|
||
| // Only used for AI Functions | ||
| params.setAiResources(collectAiResources(connectContext)); | ||
| params.setS3Resources(coordinatorContext.s3Resources); |
There was a problem hiding this comment.
[P2] Forward the S3 snapshot to stream and routine loads
A load mapping such as file_size=ELEMENT_AT(TO_FILE('res', uri), 'size') is accepted for a BIGINT destination. NereidsLoadPlanInfoCollector translates it with a local PlanTranslatorContext, but drops that context's s3Resources; NereidsStreamLoadPlanner builds fragment parameters directly and never calls this setter. FunctionToFile::open therefore fails with missing query resources on the first load/task, even for NULL URI input. Carry the collector snapshot into the direct load parameters. This is a separate stream/routine instance from the known broker handoff and stale-snapshot-after-rotation threads: no credential change or plan reuse is needed.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
apache/doris-website#4380
Problem Summary:
Introduce FILE as an independent query type for file references, metadata, and optional inline binary content.
FILE has six nullable fields: uri, offset, size, content_type, checksum, and inline. A non-NULL FILE must have a non-NULL uri or non-NULL inline. Inline content can coexist with metadata, and URI strings are preserved without FILE-specific normalization.
This PR includes:
Current boundaries:
Release note
None