Repository navigation
Conversation
### What problem does this PR solve?\n\nIssue Number: close apache#28228\n\nRelated PR: apache#67907\n\nProblem Summary: Preserve parameterized geometry and geography types through Nereids function binding and add the geography WKB constructor on master.\n\n### Release note\n\nAdd spatial function type binding for geometry and geography values.\n\n### Check List (For Author)\n\n- Test: FE focused test pending; BE build pending\n- Behavior changed: Yes (spatial function return and input types)\n- Does this need documentation: No
Align generated Nereids spatial constructors with the native Geometry return type and preserve spatial inputs for ST_ASTEXT.
Record the master-port decisions, focused FE test result, and remaining BE and format gaps.
Add Geometry and Geography to the BE Iceberg schema model, preserve their Arrow binary metadata, and reject spatial values in internal-table DDL including nested containers.
Allow Arrow and Parquet binary materialization to operate on the spatial column container while preserving existing VARBINARY behavior. ### Check List (For Author)\n\n- Test: FE DDL test pending; BE build pending\n- Behavior changed: Yes (spatial binary read/write)\n- Does this need documentation: No
Allow spatial functions to consume raw WKB columns and preserve canonical WKB bytes in geometry and geography constructors. ### Check List (For Author)\n\n- Test: BE unit test pending; FE tests unaffected\n- Behavior changed: Yes (spatial WKB function inputs)\n- Does this need documentation: No
Reject malformed spatial payloads before geo functions execute and expose the validator for Iceberg write paths. ### Check List (For Author)\n\n- Test: BE unit test pending; dependency setup still blocks BE build\n- Behavior changed: Yes (invalid spatial input errors)\n- Does this need documentation: No
Emit top-level Geometry and Geography logical annotations in Iceberg Parquet files, validate WKB inputs before conversion, and reject nested spatial columns that the writer cannot represent. ### Check List (For Author)\n\n- Test: C++ writer test added; BE build pending dependency setup\n- Behavior changed: Yes (Iceberg Parquet schema and input validation)\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: Validate raw spatial WKB inputs before spatial functions and Iceberg writes while preserving Geography SRID compatibility.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: FE focused tests passed; BE build blocked during third-party submodule preparation\n- Behavior changed: Yes (invalid Geometry WKB is rejected earlier)\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: Remove stale comments that described explicitly supported Iceberg spatial types as unsupported and record the current validation commit in the work log.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: No need to test; comment and worklog only\n- Behavior changed: No\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: The mapping implementation handles Geometry and Geography explicitly, but its fallback comment still listed them as unsupported.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: No need to test; comment only\n- Behavior changed: No\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: Add an external Iceberg V3 regression that creates a Geometry table, writes raw WKB through Doris, reads it back from Parquet, and checks ST_AsText output.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: Added gated external Iceberg regression; not run because the external Docker environment is unavailable\n- Behavior changed: No\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: Generic connector sink coercion could hide Geometry/Geography kind, CRS, and edge-algorithm mismatches before Iceberg writes. Validate spatial source expressions against target metadata before the common coercion path, while preserving NULL writes.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: ./build.sh --fe; FE_UT_PARALLEL=1 ./run-fe-ut.sh --run org.apache.doris.datasource.connector.converter.ConnectorSpatialWriteValidatorTest\n- Behavior changed: Yes (invalid spatial write conversions fail during analysis)\n- Does this need documentation: No
### What problem does this PR solve?\n\nIssue Number: N/A\n\nRelated PR: apache#67907\n\nProblem Summary: Adding external-only spatial primitive types left the exhaustive storage-field mapping without explicit cases, causing BE compilation to fail under -Werror.\n\n### Release note\n\nNone\n\n### Check List (For Author)\n\n- Test: BE build resumed after this compile fix\n- Behavior changed: No; spatial types still reject internal segment storage\n- Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Align spatial serialization with current master APIs. Put optional spatial metadata on PScalarType, adapt generic binary SerDe to StringRef and Arrow offsets, remove obsolete column overrides and version constants, and verify Parquet CRS through concrete logical types. ### Release note None ### Check List (For Author) - Test: ./build.sh --be passed; BE spatial unit tests compiled but ASAN linking failed due toolchain duplicate glibc symbols; release retry pending - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Connector changelog UPDATE and MERGE plans returned before the generic sink validator, allowing spatial metadata to be coerced without checking kind, CRS, or geography algorithm. Validate each changelog expression before casting and cover both paths with plan-builder tests. ### Release note None ### Check List (For Author) - Test: FE connector spatial and changelog plan tests, 13 tests passed - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Geography values created without explicit metadata are valid under the Iceberg V3 default contract, but the BE type constructor rejected an empty algorithm. Normalize the default to spherical while preserving Geometry and explicit metadata semantics. ### Release note None ### Check List (For Author) - Test: focused BE gtest exposed and isolated the default metadata case; follow-up spatial suite in progress - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Keep projected Geometry accessors in raw WKB space, validate S2 Geography metadata before execution, preserve legacy encoded WKB plans and current master geo functions, fix spatial serialized-size accounting, and use the supported Parquet group annotation API. Cover projected Geometry and legacy EWKB with focused tests. ### Release note Spatial metadata mismatches fail explicitly rather than using incorrect spherical semantics. ### Check List (For Author) - Test: run-be-ut.sh, 86 tests passed with ASAN and local GLIBC_COMPATIBILITY=OFF; clang-format 16.0.6; build hygiene passed; clang-tidy in progress - Behavior changed: Yes, reject unsupported spatial metadata - Does this need documentation: Yes, pending spatial feature documentation
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Apply clang-format 16 to the spatial feature scope and resolve new auto and integer sign comparison diagnostics while retaining verified geo behavior. ### Release note None ### Check List (For Author) - Test: run-be-ut.sh, 86/86 passed with ASAN and local GLIBC_COMPATIBILITY=OFF; check-format.sh passed; whitespace and build hygiene passed - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: Resolve qualified-auto diagnostics in the new spatial column implementation and record verified personal test service health. ### Release note None ### Check List (For Author) - Test: full feature clang-tidy in progress; existing spatial BE suite passed 86/86 before these qualifier-only changes - Behavior changed: No - Does this need documentation: No
### What problem does this PR solve? Related PR: apache#67907 Problem Summary: ST_AsBinary copied Geometry WKB directly while ignoring the nullable column null map. Propagate NULL before copying raw bytes and test accessors with valid hidden payloads. Also resolve the fixed binary width integer-comparison diagnostic. ### Release note ST_AsBinary returns NULL for nullable Geometry input rows. ### Check List (For Author) - Test: run-be-ut.sh, 87/87 spatial and geo tests passed with ASAN and local GLIBC_COMPATIBILITY=OFF - Behavior changed: Yes, preserve NULL results - Does this need documentation: No
### What problem does this PR solve? Issue Number: N/A Related PR: apache#67907 Problem Summary: Iceberg spatial schemas have native Doris types, but SQL CREATE and ALTER cannot declare them. Add Geometry and Geography grammar with CRS and edge algorithm parameters, preserve their use as non-reserved column names, and normalize supported Geography algorithms in the shared type factory. Dispatch column types through the parser visitor so CREATE and ALTER use the same type parsing path. ### Release note Allow GEOMETRY and GEOGRAPHY declarations with CRS and Geography edge algorithm parameters for Iceberg external tables. ### Check List (For Author) - Test: Unit Test; standard run-fe-ut.sh, DataTypeTest 38/38 and ColumnDefinitionTest 8/8 passed, fe-spatial-ddl-ut.log BUILD SUCCESS - Behavior changed: Yes; SQL recognizes parameterized spatial types and rejects unsupported Geography algorithms - Does this need documentation: Yes; spatial external-table documentation pending
### What problem does this PR solve? Issue Number: N/A Related PR: apache#67907 Problem Summary: Iceberg CREATE and column evolution can introduce spatial columns on V2 or non-Parquet tables, or introduce nested spatial values that Doris cannot write. Validate these constraints before remote schema mutations. CREATE uses effective catalog override, request, and default properties; ADD and MODIFY use actual table metadata and the writer's existing format resolution, including the write-format alias. Ordinary column changes retain their existing path. ### Release note Reject Iceberg spatial schema changes that require unsupported table versions, write formats, or nested spatial writes. ### Check List (For Author) - Test: Unit Test; standard run-fe-ut.sh via personal wrapper, IcebergSpatialDdlTest 8/8, metadata DDL 37/37 and column evolution 23/23 passed, fe-spatial-spi-ddl-ut.log BUILD SUCCESS - Behavior changed: Yes; unsupported spatial schema changes fail before remote mutation - Does this need documentation: Yes; spatial external-table limitations documentation pending
### Background GEOMETRY and GEOGRAPHY share the same WKB storage and column algorithms. A runtime field distinguished their columns, with additional debug checks when copying or comparing values. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 Problem Summary: Encode the kind in the concrete ColumnSpatial type. Have the existing DataTypeSpatial dispatch to the matching column, Block codec and Parquet SerDe while retaining CRS and algorithm metadata. ### Details - Instantiate ColumnSpatial only for GEOMETRY and GEOGRAPHY. Concrete column casts enforce matching kinds in cross-column operations. - Preserve the existing WKB allocation, movement and serialization. Use owning copies for both specialization types in CASE WHEN. - Spatial WKB constructors create the column from the bound result type. This keeps coordinate validation tied to the CRS and preserves the legacy encoded STRING constructor path. - Both specializations use the existing Parquet decoder and retain the unsupported ORC boundary. ### Testing Focused ASAN BE tests cover column identity and ownership, Block wire bytes, CASE, geography functions, the spatial and ordinary Parquet paths, and Iceberg equality-delete and Parquet output. Clang-format 16 and build hygiene passed. ### Release note None ### Check List (For Author) - Test: Focused ASAN BE tests - Behavior changed: No SQL, file format or protocol change - Does this need documentation: The local design records the column layout - Pre-submission status: Partially verified. Product SQL is pending. ### AI Disclosure Codex implemented and verified the scoped review change under the author's direction.
### Background Master adds coarse external-file splits, shared file contexts and Connector API 35. The spatial branch already uses API 35 for its own SPI changes. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032, apache#70664 PR Type: Build/CI/Chore Problem Summary: Merge master and assign API 36 to the combined Connector SPI. ### Details - Preserve spatial annotation handling for Iceberg data and delete files, and byte reads for ordinary Parquet consumers. - Include the spatial schema mode in the shared footer identity so that a child reader cannot use a footer parsed with the other mode. - Keep both sides of the Connector SPI surface and update the version assertions. ### Testing - Changed-line clang-format 16, BE build hygiene, and diff whitespace checks. - Targeted FE and BE suites are recorded separately. ### Release note Connector plugins must match API 36.0. ### Check List (For Author) - Behavior changed: Yes, the combined Connector SPI requires API 36. - Does this need documentation: Yes, report the API version at handoff. - Pre-submission status: Partially verified. ### AI Disclosure - Tool: Codex - Generated: Merge resolution and commit message. - Human review: Pending.
|
run buildall |
|
/review |
There was a problem hiding this comment.
Two new P2 findings are verified: ordinary spatial comparisons expose WKB encoding as equality/order, and constant Point/Polygon predicates repeat raw/index construction and full-boundary work. Both are inline below. No existing P0/P1 finding remains applicable within the agreed participating-version scope after independent rechecking; prior findings were fixed, disproved by their consumers, or explicitly excluded by the maintainer's mixed-version scope decision.
Static coverage spans all 235 changed paths, their relevant callers/consumers, tests, and existing review discussions. The reviewed flow is Iceberg schema -> ConnectorType/catalog/Nereids -> write normalization/validation -> Thrift/Protobuf -> ColumnSpatial/WKB -> Parquet; scans traverse file/table mapping and equality deletes before materialization and typed GIS execution.
Critical-checkpoint conclusions:
- Goal and correctness: The change carries spatial kind, CRS, algorithm, requiredness and raw WKB through nested Iceberg V3 Parquet reads/writes. Unit and regression coverage supports the intended scope statically; the two inline issues remain actionable.
- Scope: Broad but coherent cross-module integration. No unrelated production change was identified.
- Concurrency and locks: No new worker/thread/lock protocol. Function state is thread-local; cached footer metadata is immutable and mutable schema/decode state stays reader-local. No new lock-order defect found.
- Lifecycle and static initialization: Arena-owned values, COW copies, analytic trimming, aggregate states and writer failure cleanup were traced. No new ownership or cross-TU initialization defect found; repeated calculation setup is reported inline.
- Configuration: No new operator configuration or dynamic-update contract.
- Compatibility: Existing VARBINARY Block bytes remain unchanged; connector API is deliberately bumped to 36.0. All participating FEs/BEs must support spatial types; mixed 4.x/5.0 execution and downgrade support are explicitly outside scope (maintainer decision).
- Thrift/Protobuf: Compared every touched definition with current 3.1/4.0/4.1/4.2/master refs, verified against live refs. New fields are optional, new IDs unused, and branch-4.1 FILE IDs remain reserved.
- Parallel paths: Checked native/physical Parquet conversion, Hive/Broker raw BINARY, table BINARY overrides, visible/hidden equality-delete keys, timestamp siblings, INSERT/UPDATE/MERGE/changelog, CTE/UNION, aggregate states and windows. Direct spatial ORC SerDe entry points reject explicitly; Parquet is the documented supported scope. Generic BINARY-to-spatial evolution is not a proven table-wide ORC rejection gate. Generic comparison consumers remain incomplete as reported.
- Conditional admission: CRS/algorithm identity, V3/Parquet, referenced CRS, NULL parents and raw dimensional storage versus XY operations have explicit checks. The missing comparison boundary is the first inline finding.
- Tests: Inspected FE/BE unit and integration additions and negative cases. Missing regression coverage includes scalar/ARRAY generic comparisons on opposite-endian values and constant/vector Point/Polygon work counts.
- Expected results: Checked the changed query/golden shapes, error contracts and GIS topology/numeric fixtures, including independent WKB decoding, bearing arithmetic and analytic counts. No additional concrete mismatch found. No Doris tests, SQL, builds or benchmarks ran in this review.
- Observability: Existing Status/error context and reader/write profiles remain available. A deterministic work counter is appropriate for the reported Point/Polygon performance regression; no additional logging requirement found.
- Persistence and failover: Spatial parameters are retained in catalog/Gson, type transport, external schema and Parquet annotations. DDL validation follows SDK-observed commit/retry candidates; no new journal or independent transaction protocol is introduced.
- Writes and atomicity: Required nested fields are validated against the complete schema before Arrow conversion. Existing Iceberg commit/abort handling remains in use; failed writer setup closes pending upload work before deletion. No additional static atomicity or crash-cleanup defect found. Internal visible-version and MoW/delete-bitmap protocols are not changed.
- FE/BE propagation: Kind/CRS/algorithm producers and consumers, recursive external schema transport, MySQL binary metadata and BE folding exclusions were traced. Direct spatial Flight schemas remain unsupported; text/binary projections are the documented boundary.
- Performance: Column ownership/compaction and shared binary transfer avoid the previously reported copies. The separate constant Point/Polygon repetition is reported inline. Previously discussed dense-Polygon noding and native nullable-batching limits remain known deferred work.
- Other concerns and user focus: No extra focus was supplied. No additional verified defect or unresolved candidate remains after the recorded dispositions.
Limits: This is static inspection with independent arithmetic, not runtime certification of interoperability, platform builds, last-bit S2 behavior or performance. Existing explicitly deferred limitations are not new findings. Convergence describes completion of this bounded review, not resolution of the reported code issues.
Review converged after 3 round(s).
### Background The hash-key selector is shared by multiple execution operators. The spatial key cleanup removed the specialized path. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Build/CI/Chore Problem Summary: The spatial PR still differs from master in the shared hash-key header by one deleted comment. Restore the upstream line so the file leaves the PR diff. ### Details - **Affected:** The shared BE hash-key header. - **Developer and release impact:** None. - **License and third-party:** None. - **Rollback:** Revert this commit. ### Testing Checked the one-line diff and verified that the header exactly matches the merged master version. ### Release note None. ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: The patch and verification notes. - Human review: Pending.
### Background Spatial SQL values carry WKB, and the existing byte comparison is used by the Iceberg reader to match equality-delete keys. SQL spatial predicates expose their own comparison semantics. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 (review follow-up) PR Type: Bugfix Ordinary comparison expressions and array comparison functions could expose the internal byte comparison, treating alternate WKB encodings of the same point as different values. ### Details - **Frequency:** Every ordinary comparison with a spatial operand that reached execution. - **Root cause:** Comparison analysis and array comparison type checks admitted spatial operands. - **Why existing tests missed it:** The existing join and sorting checks did not cover a scalar predicate in projection or an array comparison over the spatial type. - **Fix:** Reject spatial comparison operands and array comparison keys, including nested spatial values. - **Other paths and branches:** Keep spatial functions, ordinary sort keys with spatial payloads, and Iceberg equality-delete. ### Testing Two new analysis tests reproduced the missing rejection before the fix. All 72 selected FE tests passed after the fix. ### Release note Use spatial predicates for spatial comparisons. ### Check List (For Author) - Behavior changed: Yes (generic spatial comparisons are rejected). - Does this need documentation: No. - Pre-submission status: Partially verified: isolated SQL regression follows the source-identified build. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Implementation, regression tests, and commit message. - Human review: Pending.
### Background Typed Geography relations validate raw longitude and latitude close to rounded S2 polygon boundaries. Scalar execution already caches decoded constants across blocks. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 (review follow-up) PR Type: Performance A constant polygon tested against a point column was indexed for each row. Each row also walked the polygon edges to check possible rounding ambiguity. ### Details - **Why it was slow:** The relation rebuilt polygon noding and its index for each point. - **Optimization:** Cache the constant polygon index across blocks. For short edges, use a conservative boundary-distance query before deciding whether to run the raw checks. - **Results:** In the 128-point test, boundary checks were 33,280 and 33,280 in one uncached block versus 256 and 256 across two cached blocks, by argument order. The prepared index was built once per constant. - **Applicability and cost:** Typed Geography point relations with a constant polygon. Points near a boundary and polygons with long edges use the original path. Cache storage is bounded to the constant for each argument and thread. ### Testing All 187 selected BE ASAN tests passed. The counter test compared both argument orders, boundary points, NULLs, and polygon changes. The run included spatial data type and five Iceberg equality-delete tests. ### Release note Point predicates reuse the prepared index for eligible constant Geography polygons. ### Check List (For Author) - Behavior changed: No. - Does this need documentation: No. - Pre-submission status: Partially verified: isolated SQL regression follows the source-identified build. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Implementation, counter test, and commit message. - Human review: Pending.
### Background The constant-polygon regression exercises the same row results and operation counts in both argument orders. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 (review follow-up) PR Type: Test Place the shared assertions in a test helper and give the counter label an explicit type so clang-tidy accepts the regression. ### Details - **Failure:** clang-tidy flagged the nested assertion body and the deduced pointer type. - **Cause:** GTest assertion macros add branches inside the argument-order loop. - **Stability evidence:** The unchanged 187-case selection passed after the test-only edit. The two argument orders recorded the same polygon reuse and boundary check counts. ### Testing The targeted BE ASAN run, changed-line clang-tidy, and formatting check passed. The FE and BE product build and isolated SQL suites passed with identical production source. ### Release note None. ### Check List (For Author) - Behavior changed: No. - Does this need documentation: No. - Pre-submission status: Ready. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Test-only cleanup and commit message. - Human review: Pending.
|
/review |
There was a problem hiding this comment.
Review converged after one static review round. The PR adds parameterized GEOMETRY/GEOGRAPHY types, WKB validation and Geography calculations, Iceberg Parquet schema/read/write integration, and Nereids/connector legality and write normalization. I inspected the complete authoritative diff, all required AGENTS.md files, the FileScannerV2/Parquet review guides, existing review threads, tests, and upstream/downstream call paths. No new valuable finding survived the three assigned reviews: BE spatial core found no additional parser, relation, Arena, SerDe, CASE, or aggregate defect; format-v2/Iceberg found no distinct schema-cache, nested mapping, equality-delete, timestamp-sibling, or writer defect; FE found no unsound typed-signature, cast, normalization, or metadata round-trip defect. The supplied review focus is empty, so there are no additional user focus points to address. Existing blocking findings that still apply are carried by ID and are not duplicated: Geography bearing uses an incomplete longitude factor (4409568560), non-point Geography distance misses zero for contained/overlapping shapes (4428917878), typed operations accept ISO-dimensional WKB despite the intended rejection (4434477659), Iceberg identity partitioning admits spatial columns although BE partition formatting has no spatial case (4426807465), and spatial Thrift values lack a rolling-upgrade backend-version gate (4430686953). Prior P1s for nullable schema construction, reserved FILE ids, Apple wide arithmetic, spatial ORC SerDe handling, nested MAP-key legality, and runtime required-container NULL validation were checked and are fixed at this head. Critical review checkpoints: no new concurrency or lock/lifecycle defect was found; spatial Arena ownership and typed parameter propagation were traced through generic column operations; protocol field/enum IDs remain optional and branch-compatible, while the existing rolling-version gate remains blocking; tests and build/runtime validation were inspected only and were not executed under this static review contract.
Review converged after 1 round(s).
Existing P0/P1 findings confirmed for this head: #69032 (comment), #69032 (comment), #69032 (comment), #69032 (comment), #69032 (comment)
|
run buildall |
### Background Apache Doris apache#70744 replaced in-place window trimming with column slicing. Sliced columns hold the retained input and own its storage. ### What problem does this PR solve? Issue Number: None Related PR: apache#70744 (upstream window trimming change) PR Type: Refactor The spatial column still overrides the deleted erase interface. Synchronize master and adopt the shared cut path for spatial window values. ### Details - **Moves vs. logic changes:** Remove the obsolete override and two tests dedicated to in-place erase. Store the payload Arena directly in ColumnSpatial. - **Behavior change:** Spatial window results preserve their selected WKB bytes and NULLs across trimming. - **Compatibility:** The upstream cut implementation reaches the existing spatial range insertion. Persisted WKB and Block serialization use their existing formats. - **Performance impact:** The shared cut path copies retained rows. The value member removes the separate Arena object allocation. This validation checks behavior. - **Rollback:** The previous erase implementation depends on the upstream interface removed by apache#70744. ### Testing - Local Clang 21 ASAN BE build with the standard wrapper passed. - All eight existing FirstAndLastValuesSurviveRowTrimming tests passed with no skips. - Changed-line clang-format 16, build hygiene, and scoped clang-tidy passed. ### Release note None. ### Check List (For Author) - Behavior changed: No. - Does this need documentation: The local design draft is updated with the new trimming and Arena ownership description. - Pre-submission status: Ready. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Scoped integration, local design draft update, and commit message. - Human review: Pending.
|
/review |
There was a problem hiding this comment.
Static review of #69032 at 6c68032 identified one new P2 correctness finding: typed Geography can publish a rounded-only Line/Line intersection and zero distance for disjoint raw meridians. Please address the inline case. No new P0/P1 finding was verified.
Critical checkpoint conclusions:
- Goal and evidence: native Iceberg V3 GEOMETRY/GEOGRAPHY identity and raw WKB are carried through catalog mapping, planning, transport, columns and Parquet read/write. The inline finding leaves a calculation correctness gap. Positive/negative unit and SQL coverage exists; tests were inspected, not executed.
- Scope and reuse: this broad feature touches 236 paths across the affected layers. Shared binary serialization/SerDe and centralized spatial signature/write validation preserve existing VARBINARY and legacy STRING behavior.
- Concurrency and locking: no new threads or lock order were introduced. Relation caches are THREAD_LOCAL; footer metadata is immutable and selected types are split-local. DDL validation delegates SDK CAS/retry and checks observed commit candidates.
- Lifecycle and static initialization: owning column copies, CASE/aggregate states and analytic cut paths retain WKB storage correctly. Failed writer cleanup finishes upload owners before deletion. No new cross-translation-unit initialization dependency was identified.
- Configuration: no new runtime configuration item; reader modes are propagated into footer-cache/shared-context identity and nested DDL is a connector capability opt-in.
- Compatibility: legacy STRING constructors and binary Block layout remain. Connector API35-to36 is deliberate and consistently pinned. Spatial execution requires participating nodes that support these types; mixed4.x/5.0 execution was explicitly excluded by the existing maintainer scope decision. ORC, direct Flight schemas, internal spatial storage and unsupported calculation metadata/shapes retain explicit boundaries.
- Thrift/protobuf: all touched definitions were compared with current branch-3.1, branch-4.0, branch-4.1 and branch-4.2. Added fields are optional; enum values are explicit and branch4.1 FILE identities are reserved/skipped. No new ID collision or reuse was found.
- Parallel paths: VALUES/SELECT, UPDATE/MERGE/changelog/rewrite, UNION/CTE/outer-join scopes, scalar/aggregate/state/window/key consumers, typed versus opaque BINARY, plain/dictionary decoding, hidden/equality-delete keys and nested timestamp siblings were inspected. No additional defect was substantiated.
- Conditional checks: comments and guards cover concrete CRS/algorithm, NULL, dimensional, format and ambiguous-topology cases. The positive crossing branch identified inline needs a corresponding raw-coordinate admission check.
- Functional/negative/unit coverage: tests cover metadata, byte order, Z/M storage and calculation rejection, malformed/deep WKB, owning storage, NULL parents/required children, incompatible writes, query-key restrictions, writer cleanup and reader modes. The new separated-meridian case needs coverage in both operand orders.
- Expected results: added golden sections and relevant error assertions were inspected; every statically named query in the three changed suites has a corresponding result label. No additional mismatch was identified; generation and comparison were not run.
- Observability: contextual spatial/schema errors use existing status paths and reader/writer profiles. No new distributed operation requiring a separate metrics lifecycle was introduced.
- Persistence and failover: schema/type metadata carries spatial parameters; no internal EditLog, rowset visibility or delete-bitmap state machine changed. External Iceberg commit/cleanup behavior is reused, with the existing REST server-rebase limitation acknowledged.
- Writes and atomicity: original spatial identity is checked before coercion; runtime required-container checks precede Arrow conversion; WKB validation precedes writes and referenced-CRS preflight precedes file creation.
- FE-to-BE propagation: kind/CRS/algorithm are carried through normal/nested descriptors, block metadata and history-schema restoration. Remote constant folding excludes spatial PValues FE cannot decode.
- Performance: constant polygon reuse and indexed Polygon/Line admission were inspected, including work-count tests. The already-discussed general dense-Polygon and nullable-V2 batching limitations are not reposted. No benchmark or performance execution was performed.
- Other checks: deliberate missed-issue sweeps found no additional verified issue beyond the inline finding.
Existing review context: all threads/replies and the raw comment history were considered. The 11 previously reported P1 comments are repaired, guarded, based on a premise contradicted by current dependencies, or outside the explicitly recorded mixed-version scope; none is listed as a current blocking comment. Existing P2 concerns, including acknowledged performance limits, are suppressed as duplicates.
User focus: no additional focus points were provided; the whole PR was reviewed.
Validation limits: static source/test inspection and independent binary64/exact-rational arithmetic only. No builds, tests, benchmarks, cluster probes, interoperability execution or built-artifact ABI audit ran. Repository source was not modified.
Review converged after 2 round(s).
### Background Master now plans Iceberg REWRITE file ordering from the write schema and uses Connector API 36.0 for the file-format SPI. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032, apache#70615, apache#70903 PR Type: Build/CI/Chore Problem Summary: Integrate the upstream REWRITE path and distinguish spatial-aware plugins from plugins built for upstream API 36.0. ### Details - Affected: Validate REWRITE spatial writes against the schema resolved after beginWrite, before the sink is built. Use this same context for the upstream sort-order handling. - Developer and release impact: Set the combined Connector SPI to 37.0. - License and third-party: None. - Rollback: Reverting this merge restores the previous upstream baseline. ### Testing - IcebergWritePlanProviderTest, ConnectorPluginSurfaceTest and ConnectorMetadataSurfaceTest: 131 tests passed. - PluginApiVersionWiringTest: 14 tests passed. ### Notes for Reviewers The plugin-loading test exercises refusal of an upstream 36.0 plugin. ### Release note Rebuild Connector plugins for API 37.0. ### Check List (For Author) - Behavior changed: Connector plugins must declare the updated API. - Does this need documentation: Yes, update the PR compatibility note. - Pre-submission status: Targeted tests passed. ### AI Disclosure - Tool: Codex - Generated: Merge resolution, test expectation, and commit message. - Human review: Pending.
|
run buildall |
|
/review |
There was a problem hiding this comment.
Static review of head 35d741f7ba379e9387a50d4343f7cc5103f9ea69, covering all 236 changed paths and the existing inline discussions. Three new P2 findings: NULLIF bypasses spatial comparison admission and compares WKB bytes; imported spatial-key MAP lookup bypasses unsupported-key admission; Distance/DWithin repeatedly prepare constant Geography operands. The existing rounded Line/Line crossing issue remains known context and is not duplicated.
No additional user focus was supplied. Builds, tests, benchmarks and cluster execution were prohibited and were not run. Test code and expected results were inspected; author-reported runs are not independent validation by this review.
Critical checkpoint conclusions:
| Checkpoint | Conclusion from static inspection |
|---|---|
| Goal and behavior | The change carries Iceberg spatial identity and raw WKB through catalog mapping, planning, BE execution and Parquet writeback. Known precision limits and the new NULLIF/MAP-lookup/repeated-preparation issues prevent an unqualified endorsement. |
| Scope and clarity | The large change spans the required type, admission, execution and I/O boundaries; most added content is tests. Complex raw-coordinate admission and the NULL normalizer deserve continued maintenance coverage. |
| Concurrency and locks | Function caches are thread-local. Footer entries remain shared and immutable; spatial byte mode participates in cache/context identity, with schema overrides per reader. DDL validates SDK-observed commit candidates across CAS retries. No new lock inversion established. |
| Lifetime and initialization | Spatial copies and cut/aggregate/CASE paths retain owning WKB. Writer failure cleanup closes pending uploads before deletion. The software-wide arithmetic fallback handles narrow long-double ABIs; no new cross-TU initialization dependency established. |
| Configuration | No new runtime setting; dynamic configuration propagation is not applicable. |
| Compatibility | Existing VARBINARY Block layout is retained. Spatial execution requires participating nodes to support the new types; mixed 4.x/5.0 execution is explicitly excluded by the prior scope decision. Connector POM and version tests use API 37.0. |
| Thrift/protobuf | Read every touched definition on HEAD, current master and branch-3.1/4.0/4.1/4.2. New fields are optional; spatial enum numbers avoid branch-4.1 FILE identities. No new ID collision found. |
| Parallel paths | Inspected scalar/nested types, INSERT/UPDATE/MERGE/changelog, equality-delete readers, byte/typed Parquet modes, nullable/constant operands, CASE and window/aggregate state paths. ORC spatial materialization and unsupported clients/operations have explicit boundaries. |
| Special conditions | Admission distinguishes kind/CRS/algorithm, required containers, Z/M storage versus XY calculations, and raw versus rounded boundaries. NULLIF and imported spatial MAP lookup bypass ordinary comparison/key admission; existing positive Line/Line crossing certification remains a known issue. |
| Test coverage | Broad FE, BE and SQL coverage exists for mapping, malformed WKB, nested NULLs, admission, serialization, ownership, writer failures and spherical edges. NULLIF opposite-endian admission, imported spatial MAP lookup and Distance/DWithin constant polygon preparation lack focused coverage. No test execution performed. |
| Changed expected results | The changed SQL projections and golden outputs were inspected within review scope; generation provenance and runtime correctness cannot be established by static inspection. |
| Observability | Unsupported and malformed inputs return explicit errors; existing I/O profiles and cleanup diagnostics remain. Performance counts in this review are derived from source, not timings. |
| Persistence and transactions | Spatial metadata is carried in catalog/type serialization and Parquet annotations. No new EditLog, partition-visible-version or MoW bitmap protocol is introduced. Existing Iceberg transaction/commit semantics remain responsible for atomicity and failover. |
| Data writes and failure | Identity/format/CRS checks precede coercion/file creation; runtime schema validation covers required intermediate containers. Failed asynchronous writers are closed before object cleanup. REST server rebases outside the observed SDK candidate remain a documented limit. |
| FE/BE transport | Kind, CRS and edge algorithm are carried through connector types, thrift/protobuf and schema-evolution metadata. Spatial remote constant folding is excluded because FE lacks spatial PValue decoding. |
| Performance | One new issue: per-row Distance/DWithin reconstruct constant raw-coordinate and S2 state, including identical distance work when only the radius varies. Existing relation cache does not cover this consumer. |
| Other issues | Earlier P1 reports were fixed, disproved by the current dependency contract, or explicitly disposed by the agreed scope. The new NULLIF and imported MAP lookup consumers need recursive admission checks. No still-applicable P0/P1 has been independently confirmed within that scope. |
Review converged after 3 rounds. All three assigned reviewers returned NO_NEW_VALUABLE_FINDINGS in the final round after challenging the complete finding set and rechecking their scopes. The final sweep accounts for all 236 changed paths and all six initial risks; every new candidate is accepted, deduplicated or dismissed with source evidence. No unresolved new candidate or identified unreviewed changed path remains.
Remaining validation and support limits: static inspection only; no build, test, SQL, benchmark or cluster execution, no independent golden-generation provenance, and no runtime reproduction of the imported MAP fixture. The already-reported rounded Line/Line crossing defect and acknowledged general dense-Polygon complexity remain known context. Direct spatial Flight, mixed 4.x/5.0 execution and REST rebases outside client-observed commit candidates retain their recorded support/dependency limits. No still-applicable P0/P1 was independently confirmed within the accepted review scope.
Review converged after 3 round(s).
### Background Opposite WKB byte orders can represent the same point. NULLIF and MAP lookup compare their inputs inside BE functions, bypassing planner checks on comparison predicates. Spherical distance also repeats setup when a constant operand is paired with varying points or radii. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 PR Type: Bugfix Problem Summary: Reject unsupported comparisons and reuse eligible constant Geography operands within a block. ### Details - Frequency: Spatial NULLIF and imported spatial MAP keys can reach a byte comparison. Constant shapes can trigger repeated spherical noding. - Root cause: The scalar functions admitted spatial leaves. Distance evaluation reused only the decoded shapes. - Why existing tests missed it: The MAP constructor rejects spatial keys before lookup. Result-only distance checks miss repeated setup. - Fix: Validate compared types before coercion and after rewrite. Cache the distance when both shapes are constant. Reuse the prepared polygon index when the varying point cannot affect noding. - Other paths and branches: Ordinary MAP keys can select spatial values. Boundary points and long arcs retain pairwise distance handling. ### Testing - FE SpatialPredicateLegalityTest and ElementAtTest: 14 tests passed. - ASAN VGeoFunctionsTest: 165 tests passed with the final sources. - FE and BE built successfully. Isolated SQL passed test_spatial_wkb_compatibility and test_iceberg_spatial_v3. - Changed-line clang-tidy, formatting and build hygiene passed. ### Notes for Reviewers The imported MAP fixture stores a big-endian POINT(1 2) key mapped to 7. SQL probes both byte orders. The distance tests compare cached and uncached results in both orders and count distance and index work. ### Release note NULLIF rejects spatial arguments, and MAP lookup rejects spatial keys. Spherical distance functions reuse eligible constant operands. ### Check List (For Author) - Behavior changed: Unsupported spatial comparisons raise an analysis error. - Does this need documentation: The existing spatial-key restrictions apply. - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: Implementation, tests, and commit message. - Human review: Pending.
### Background Iceberg spatial columns retain their original WKB in Doris. The typed constructors previously accepted hexadecimal text. MySQL clients received raw bytes when selecting a spatial column directly. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 (Iceberg spatial types) PR Type: Enhancement Problem Summary: Let callers pass raw WKB to the typed constructors and read the result of a spatial expression directly in a MySQL client. Remove the unused raw binary conversion left over from the old scanner. ### Details - **Before and after:** The two typed constructors accept VARBINARY as well as hex text. MySQL text and prepared results render top-level spatial columns as WKT. The active Parquet reader and annotated statistics conversion keep their distinct type checks. - **Configs and defaults:** No configuration changes. - **Impact on existing users:** ST_AsBinary still returns the original bytes. SQL CAST rules and the display of nested spatial values stay unchanged. ### Testing FE and BE built locally. 36 targeted FE tests and 259 BE tests passed. The spatial WKB and Iceberg V3 SQL suites passed on an isolated instance. A real equality delete removed id 11 and retained ids 22 and 33. Connector/J server-side prepared statements returned String for a spatial column, byte[] for ST_AsBinary and SQL NULL for the null row. ### Release note The typed WKB constructors accept VARBINARY directly. MySQL clients display top-level spatial columns as WKT and can use ST_AsBinary to retrieve the original WKB bytes. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes, update apache/doris-website#4239. - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: Implementation, tests and commit message. - Human review: Pending.
|
/review |
There was a problem hiding this comment.
Static review of 69b0bc22fb36464f76ff793c55ec1f237bfb4780: one new P2 finding is submitted inline. Polygon/Line ambiguity admission can reject a definite independent edge crossing; the near-zero distance certificate inherits the same failure.
Existing context was refreshed and deduplicated. The API-version test mismatch in 4545595996 still applies (API 38 versus expected major 37). The separate Line/Line rounded-crossing concern in 4675897762 also remains covered by its existing thread. Neither is reposted. No existing in-scope P0/P1 was independently confirmed to remain blocking; the mixed 4.x/5.0 concern was explicitly excluded by the accepted support matrix. Previously deferred nullable spatial batching and dense-polygon noding work remain known performance limits.
Critical checkpoint conclusions:
- Goal and proof: Native Iceberg V3 spatial identity, recursive Parquet I/O and typed functions are represented end to end. The new inline finding is a gap in admitted Geography operations. Positive, negative and work-count tests were inspected; they were not executed.
- Scope and reuse: The 238-file change is broad but centered on spatial type transport, I/O, admission and calculation. Binary SerDe/Block helpers and existing Iceberg machinery are reused. No unrelated functional defect was substantiated.
- Concurrency and locking: No new worker or lock protocol is introduced. Relation caches are THREAD_LOCAL, distance caches are block-local, and mutable reader schemas are split-local. DDL delegates existing CAS/retry operations. No new lock inversion was found statically.
- Lifecycle and static initialization: Spatial column copies own their WKB; aggregate states retain owning columns; cache invalidation releases prepared indexes. Failed writer close/cleanup paths and function-context ownership were traced. Software-pi initialization is lazy, without a new cross-translation-unit dependency.
- Configuration: No new runtime configuration item is added. Connector API 38.0 requires rebuilt plugins; the stale FE assertion remains the already-reported issue above.
- Compatibility: Existing VARBINARY Block layout is preserved. Participating FEs/BEs must support spatial types; mixed 4.x/5.0 spatial execution and downgrade are outside the documented support matrix.
- Thrift/protobuf: Every touched definition was compared with live-matching branch-3.1, 4.0, 4.1 and 4.2 refs. Added fields are optional; new enum values are explicit and avoid the existing FILE identities. No new field-ID collision was found.
- Parallel paths: Typed/legacy functions, both operand orders, constant/vector/nullable inputs, nested containers, both area units, read/write and projected/hidden equality-delete keys were reviewed. The missing Polygon/Line crossing witness is distinct from the repaired Polygon/Polygon path.
- Conditional checks: Precision, metadata, requiredness and unsupported-operation gates have concrete failure scenarios. The inline finding identifies an overly restrictive vertex-only existential gate.
- Test coverage: FE/BE and regression changes cover metadata, byte order, Z/M/EMPTY, NULLs, unsupported comparisons/keys/states, CTE/UNION/MERGE provenance, ordinary controls, required nested fields, writer failure and reader/cache boundaries. Add collision-plus-independent-crossing Polygon/Line coverage for the finding.
- Expected results: All three changed golden files and their query families were inspected, including WKT/hex/NULL, nested values and ordinary VARBINARY controls. No additional result mismatch was substantiated. Generated provenance and runtime outcomes cannot be proved by static review.
- Observability: Existing reader profiles and explicit function/type/field/row errors remain usable; no new hot-path logging requirement was identified.
- Persistence and failover: Kind, CRS and algorithm use existing catalog serialization and FE/BE carriers. No new EditLog event, visibility-version or MoW/delete-bitmap protocol is introduced. Existing Iceberg transaction/commit recovery remains authoritative.
- Writes and atomicity: V3/Parquet/projjson admission, actual DDL commit candidates, runtime requiredness and file cleanup were traced. No additional atomicity defect was substantiated; crash/failover behavior was not exercised.
- FE/BE transport: Catalog, connector, Thrift, protobuf and Block paths preserve spatial parameters. Remote folding and unsupported comparison/runtime-filter paths are gated; ordinary-key spatial payload paths remain admitted.
- Performance and further checks: Constant polygon preparation and constant-shape distance reuse address prior repeated setup. Noding, copying, NULL materialization, error exits and parallel consumers were checked; the previously deferred performance limits are retained as known context.
No additional user-provided focus was specified. Validation was static source/test inspection and independent arithmetic only: no builds, tests, SQL, benchmarks, source modifications or submodule initialization.
Review converged after 2 round(s).
|
run buildall |
1 similar comment
|
run buildall |
Attempt to load a plugin built against API 37.0, the last version without the spatial contract. Check registration directly so later connector API upgrades do not invalidate the test. All 14 tests in PluginApiVersionWiringTest passed.
### Background Spherical predicates convert longitude and latitude to S2 points. Two distinct vertices can round to the same point during conversion. ### What problem does this PR solve? Issue Number: None Related PR: apache#69032 PR Type: Bugfix Problem Summary: An unrelated vertex collision could hide a genuine crossing of a polygon boundary. Intersects, Disjoint, Distance and DWithin then reported that the result was ambiguous. ### Details - Frequency: An exterior line vertex rounds onto the polygon while another segment crosses it, with all line vertices outside. - Root cause: Polygon/line admission only considered vertices as independent witnesses of contact. - Why existing tests missed it: Earlier regressions covered line/line and polygon/polygon crossings. - Fix: When vertices do not prove contact, query the indexed boundary edges and certify candidate crossings with the original coordinates. - Other paths and branches: Rounded contact without a witness retains its ambiguity error. Both operand orders use the same proof. ### Testing Reproduced all eight errors with SQL on the previous build. Added a regression for both orders of Intersects, Disjoint, Distance and DWithin at a zero radius. The new test passed in a 210-test ASAN run. ### Release note For default spherical Geography, a certified polygon-line crossing counts as an intersection and has zero distance even when a separate vertex is ambiguous after rounding. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: No. This implements the existing predicate and distance contracts. - Pre-submission status: Ready; targeted FE and BE tests passed. ### AI Disclosure - Tool: Codex - Generated: Implementation, regression test and commit description. - Human review: Pending.
|
/review |
Background
Iceberg V3 defines GEOMETRY and GEOGRAPHY with a coordinate reference system (CRS); GEOGRAPHY also identifies its edge algorithm. Their Parquet representation carries WKB bytes and spatial annotations. Doris needs to preserve that identity through catalog mapping, query execution and writeback, while keeping its existing STRING-based spatial functions compatible.
What problem does this PR solve?
Issue Number: None
Related PR: #67907 (earlier feature PR), #70744 (shared window trimming)
PR Type: Feature
Problem Summary:
Read, query and write Iceberg V3 spatial columns while preserving their CRS, edge algorithm and WKB. The change spans catalog mapping, execution and Parquet I/O. About 65% of added lines are tests or expected results.
Details
Change map: 239 files, +24,874/-722. Tests account for +15,382/-40 and generated regression output for another +800. Production and build files account for +8,692/-682. User documentation is in the separate website PR.
ColumnSpatialand reuse the binary SerDe.ConnectorSpatialWriteNormalizerandConnectorSpatialWriteValidatorfor writes, andCheckAnalysisfor query keys.functions_geo.cpp,wkb_parse.cppandgeography_calculation.cpp.Scope: Parquet reads and writes support spatial columns, ARRAY elements, ordinary-key MAP values and STRUCT fields. All seven ISO WKB shape kinds round-trip with XY, XYZ, XYM or XYZM coordinates.
ST_AsTextrequires XY. Geography measurements and predicates support nonempty XY Point, LineString and Polygon with defaultOGC:CRS84/sphericalmetadata.SQL comparisons,
NULLIF, MAP lookup by spatial key, equality joins, grouping, deduplication, window partitioning and sorting reject spatial keys, including nested spatial values where applicable. Ordinary keys can carry spatial payloads through these operations.UNION ALLalso supports spatial values. Internal spatial storage, spatial indexes, ORC, spatial VARIANT, bounds pruning, predicate pushdown, CRS conversion and typed WKT input remain outside scope.Design: Type metadata carries kind, CRS and edge algorithm. Keeping the original WKB preserves byte order.
ColumnSpatialspecializes by kind, and both kinds shareDataTypeSpatialfor metadata. The active Parquet reader shares binary decoding with VARBINARY and uses the Iceberg field ID to recover the declared type, including for unprojected equality-delete keys. Plain BINARY columns keep their binary representation. The spatial SerDe validates WKB, and shared Parquet footers distinguish typed reads from raw-byte reads. FE write normalization retains ordinary keys/siblings and requiredness before coercion. If rounding places a line vertex on a polygon boundary in S2, Doris checks the original coordinates. A verified crossing on another segment establishes intersection and zero distance. If contact remains ambiguous, the operation reports an unsupported case. Typed predicates and distance functions reuse prepared state for eligible constant Geography polygons. When both shapes are constant,ST_DWithincomputes their distance once per block and evaluates each row's radius and NULL status. See the PR discussion for scope decisions.Usage:
ST_GeometryFromWKBTypedandST_GeogFromWKBaccept raw WKB or hex text. This MySQL query returnsPOINT (1 2)and the original bytes in hex:Direct casts from STRING or VARBINARY to spatial types are rejected. Both constructors return NULL for invalid WKB or NULL input.
Default behavior: No new runtime flag is introduced. Eligible Iceberg fields map to native spatial types automatically. Spatial writes require Iceberg V3 and Parquet, with an explicit connector capability for nested leaves. Nondefault CRS/algorithm metadata is retained without conversion; property-referenced
projjson:writes are rejected before file creation.Compatibility: Participating FEs and BEs must understand the new spatial types. Mixed 4.x/5.0 execution and downgrades with spatial metadata are outside scope. Rebuild connector plugins against API 38.0, including plugins that expose only ordinary columns. The merged master baseline (
1e66b49b7ed) uses API 37.0. Doris rejects plugins built for 37.0 at registration. Existing STRING spatial functions and the VARBINARY Block format keep their behavior. Generic Flight SQL clients can selectST_AsBinary(g)for WKB orST_AsText(g)for XY text.Behavior change: Iceberg spatial fields map to native Doris types. Selecting a top-level spatial column through MySQL returns WKT in both text and prepared queries, including Z/M and EMPTY.
ST_AsBinaryreturns the original WKB, including byte order. SQL NULL stays NULL.Persistence and failure handling: Preserve spatial parameters in schema/type transport and Parquet annotations. Validate spatial identity and supported schemas before coercion or file creation. Reuse Iceberg's existing commit/conflict and cleanup lifecycle; DDL preflight checks SDK-observed schemas, without claiming a server-wide invariant for REST rebases the client cannot observe.
Follow-up plan: Native GeoArrow output for Flight SQL, nullable V2 batching and further dense-polygon optimization are separate follow-ups.
Testing
3e72c8cbf22, 104 targeted FE tests and 210 BE tests passed. The BE run used the default Unity build with ASan. The FE run included all 14 tests inPluginApiVersionWiringTest, including rejection of a 37.0 plugin.ST_Intersectsreturns true,ST_Disjointreturns false,ST_Distancereturns zero andST_DWithin(..., 0)returns true.69b0bc22fb3, built FE and BE and passed 36 targeted FE tests and 259 targeted BE tests. Coverage includes constructor overloads, MySQL serialization, ordinary Parquet BINARY reads, spatial annotations and Iceberg equality deletes.69b0bc22fb3, rantest_spatial_wkb_compatibilityandtest_iceberg_spatial_v3against an isolated FE/BE instance. A separate Iceberg equality-delete probe inserted IDs 11, 22 and 33. After deleting 11, both projections returned 22 and 33, including when the query omitted the delete key.Stringfor the spatial column andbyte[]forST_AsBinary. MySQL queries checked both WKB byte orders, ZM, EMPTY and SQL NULL.NULLIFand imported MAP lookup, and work counts for constant Geography distance operands. Community CI checks track the public builds.Notes for Reviewers
IColumn::cut().ColumnSpatialowns itsArenadirectly. The new column copies the retained WKB into its own storage, and releasing the old column frees its Arena.Release note
Support native Iceberg V3 GEOMETRY/GEOGRAPHY schema mapping and Parquet read/write, including ARRAY elements, ordinary-key MAP values and STRUCT fields. Preserve CRS, edge algorithm and raw ISO WKB including Z/M, with explicit XY calculation limits and unsupported-operation errors. MySQL clients display spatial columns as WKT. The typed WKB constructors accept raw VARBINARY. Connector plugins must match API 38.0.
Check List (For Author)
3e72c8cbf22. The isolated SQL suites last ran on69b0bc22fb3.AI Disclosure