Repository navigation
fix: load parquet vectors across data pages - #29111
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Astra medium review on exact head 8e77723.
[P2] LIST 切换到 row mode 后,BOOLEAN sibling 无法转换为 FLOAT/DOUBLE。
位置:pkg/sql/colexec/external/parquet_nested.go:304-316。
触发条件:Parquet 同时包含合法 LIST 向量列和非 NULL BOOLEAN 列,目标分别为 vecf32(2) 和 FLOAT 或 DOUBLE,例如 emb=[1,2], flag=true;不需要跨页即可触发。
本 PR 为 LIST 投影启用 row mode。canAppendParquetRowLeafDirectly 将 BOOLEAN -> float32/float64 判为可直接转换,绕过已有 page mapper;appendLeafValue 最终调用 parquetValueToFloat64,而该 helper 没有 BOOLEAN 分支,确定返回 cannot convert parquet BOOLEAN to floating point。原 page mapper 明确支持 BOOLEAN -> float32/float64,并将 true/false 转为 1/0。因此这是已有可加载文件在引入 LIST row mode 后的回归。
请将 BOOLEAN -> 浮点排除在 direct 分支之外并复用已有 mapper,或为共享转换 helper 补齐等价 BOOLEAN 语义;同时增加 ParquetReader 回归,覆盖 LIST + BOOLEAN sibling、FLOAT/DOUBLE 两种目标以及 true/false。
其余 V1 logical-row 重建、LIST 校验、整行 rollback、byte-budget 和 reader cleanup 路径未发现额外 P0/P1/P2。exact-head CI 已通过,coverage 不作为门槛。本次 finding 由源码调用链确认,未本地复现。
|
Addressed the BOOLEAN sibling row-mode regression in bec9b29. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Astra medium re-review on exact head bec9b29.
此前 P2 已修复:BOOLEAN -> FLOAT/DOUBLE 仍可走 row-mode direct branch,但 parquetValueToFloat64 现在正确处理 true -> 1、false -> 0;FLOAT 通过同一 helper,语义与原 page mapper 等价。真实 ParquetReader.Open/ReadBatch 回归同时覆盖 LIST vector、FLOAT/DOUBLE sibling 和 true/false。
重新核对了 V1 跨页 logical-row reconstruction(含 NumRows()==0 continuation page)、维度/NULL/malformed/overflow、sibling scalar、整行 rollback、byte budget、reader cleanup、Reset/Free 和取消路径,未发现新的 P0/P1/P2 缺陷。
验证边界:decoder 对单个巨大逻辑行的瞬时内存和解码中途取消仍没有硬上限/即时中断保证;本次未独立重跑超大行或原始大文件 SQL。这些是已披露的验证边界,不是 material defect。exact-head CI 的 external race、build、SCA 和相关 BVT 已通过。
APPROVE。
Merge Queue Status
This pull request spent 5 minutes 51 seconds in the queue, with no time running CI. ReasonPull request #29111 has been merged manually at bde7e0c HintYou were too fast! Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #29110
What this PR does / why we need it:
Parquet V1 data pages may split one repeated LIST row across physical pages. The
page-local vector mapper treated the trailing fragment as a complete vector, so
a valid
LIST<DOUBLE>[1536]could be rejected as a 512-dimensional vector.This change routes supported LIST-to-vector mappings through parquet-go's
projected logical-row reader, then reuses the existing typed LIST conversion for
dimension, NULL, overflow, and rollback semantics. When row mode is selected,
sibling scalar columns retain their existing page-mapper conversions. It also
preserves whole-row rollback,
ColDef.NotNull, malformed LIST validation,cancellation, byte-budget batching, and reader cleanup.
Validation:
NumRows()==0; verified every ID and every vector element across small-budgetbatches.
string conversions, NULL constraints, malformed NULL/missing LIST rows,
cancellation, and whole-row rollback.
go test ./pkg/sql/colexec/external -count=1make build50,000 rows loaded, with
MIN/MAX(vector_dims(emb)) = 1536/1536.The logical-row path is less vectorized and has higher allocation volume than
the page path; one unusually large logical row remains bounded only by the
Parquet decoder. The observed full-file LOAD completed in about 3.6 seconds on
the validation host.