fix(query): add partition write regression tests - #20426
Merged
Merged
Conversation
KKould
force-pushed
the
ci/partition-write-coverage
branch
from
September 2, 2026 02:54
0fd5b48 to
d81879b
Compare
sundy-li
requested changes
Sep 2, 2026
sundy-li
left a comment
Member
There was a problem hiding this comment.
发现 1 个阻塞问题:
- [P1] 修正 stored computed column 的表达式类型 —
tests/sqllogictests/suites/ee/02_computed_column/02_0001_partition_by.test:26
p声明为INT(Int32),但 Databend 将id % 2推导为Int16,因此CREATE TABLE在 EE sqllogic CI 中直接失败:expected computed column expression have type Int32 NULL, but id % 2 has type Int16 NULL。请将表达式显式转换为INT(例如p INT AS ((id % 2)::INT) STORED),或让列类型与表达式类型一致,并重新运行相关 CI。
其余 diff 仅为测试新增;当前 linux / sqllogic / ee 和 ready 检查失败,所以本次 review 不予 approve。
Merged
via the queue into
databendlabs:main
with commit Sep 7, 2026
b71dbbf
183 of 187 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
This test-only PR expands coverage for physical partition metadata and hash write layout edge cases:
MERGEmoving a row across a partition boundary preserves exact metadata for pruning.DEFAULTand stored computed partition columns are materialized before hash routing and layout.IS NULLpruning.No production behavior is changed.
Current write-path support observed while adding these tests:
This PR intentionally adds coverage only. Unifying the remaining write paths requires separate design work rather than statement-specific fixes.
Tests
Added or extended these sqllogictest files:
tests/sqllogictests/suites/base/09_fuse_engine/09_0054_partition_by.testtests/sqllogictests/suites/base/09_fuse_engine/09_0100_insert_multi_table.testtests/sqllogictests/suites/ee/02_computed_column/02_0001_partition_by.testLocal execution was skipped; CI will run the logic-test suites.
Type of change
AI assistance
This change is