You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: CSV OUTFILE SPLITSIZE creates a header-only file and writes the full batch to an oversized file #29761
CREATE STAGE split_s URL='file:///tmp/mo-split-fixture/';
SELECT result AS id, REPEAT('x',32) AS payload
FROM generate_series(1,100) g
ORDER BY result
INTO OUTFILE 'stage://split_s/out_%02d.csv'
FORMAT 'csv' SPLITSIZE '64';
Activity
fix(frontend): preserve CSV row boundaries in split OUTFILE (#29778)
Ariznawlll commentedon Oct 15, 2026
测试版本
main8795f3699b40504376343fa1acda8b4619f0c76e(验证前后均核对官方 main)ec4338ef27975aeee5334c48afda1415adf6f4ee已包含在上述 main 中。原问题验证
按 issue 的 100 行、32 字节 payload、
FORMAT 'csv' SPLITSIZE '64'、out_%02d.csv复测 3 次。每次均生成 100 个 CSV 文件;逐个解析后每个文件恰有表头和 1 条完整数据行、文件大小不超过 64 字节、没有仅含表头的文件。将所有文件读回后,ID 1–100 各出现一次,无缺失或重复(3/3)。原先的“首文件只有表头、后续文件容纳整批数据”未再出现。Happy Path 覆盖
SELECT 1正常;stage、数据库和本轮专属文件均执行清理,3/3。Unhappy Path 覆盖
out_%02d.csv目标重复导出:返回“file ... out_00.csv already exists”错误;原有 100 个文件未被增加或替换,随后 4K 对照导出仍可执行,3/3。白盒验证
本次以文件级黑盒验收为主,未额外执行 Go UT /
-race。本问题的关键断言是落盘后每个 CSV 的真实内容和字节数,已逐文件读回校验;并核对修复 PR 已进入官方 main。回归测试
script/14_issue_regression/issue_29761_csv_outfile_splitsize.py和配套.out预期。场景覆盖原复现、逐文件内容/大小、ID 完整性、占用目标拒绝、4K 对照及超阈值单行。total=3 success=3 failed=0 skipped=0。PR 当前尚未合并,完整 suite 和集成 CI 尚未验证;后续跟踪 PR/CI,不将其表述为已进入 MOTR main。测试证据
split_files=100 distinct_rows=100 header_only=0 max_split_bytes=64 large_files=1 large_bytes=3803 oversized_files=1 oversized_bytes=144 healthy=1。测试结论
测试通过。