Uh oh!
There was an error while loading. Please reload this page.
[fix](fe) Reject JSONB and variant distribution columns - #63211
Conversation
CalvinKirs
commented
May 13, 2026
run buildall |
hello-stephen
commented
May 13, 2026
TPC-H: Total hot run time: 29814 ms |
hello-stephen
commented
May 13, 2026
TPC-DS: Total hot run time: 169956 ms |
hello-stephen
commented
May 13, 2026
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
May 13, 2026
FE Regression Coverage ReportIncrement line coverage |
CalvinKirs
commented
May 13, 2026
run buildall |
1 similar comment
CalvinKirs
commented
May 13, 2026
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
hello-stephen
commented
May 13, 2026
TPC-H: Total hot run time: 29479 ms |
hello-stephen
commented
May 13, 2026
TPC-H: Total hot run time: 29558 ms |
hello-stephen
commented
May 13, 2026
TPC-DS: Total hot run time: 170207 ms |
hello-stephen
commented
May 13, 2026
TPC-DS: Total hot run time: 170454 ms |
CalvinKirs
commented
May 13, 2026
run buildall |
hello-stephen
commented
May 13, 2026
TPC-H: Total hot run time: 29691 ms |
hello-stephen
commented
May 13, 2026
TPC-DS: Total hot run time: 171320 ms |
hello-stephen
commented
May 13, 2026
FE UT Coverage ReportIncrement line coverage |
1 similar comment
hello-stephen
commented
May 13, 2026
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
May 13, 2026
FE Regression Coverage ReportIncrement line coverage |
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Hash distribution column validation missed JSONB and VARIANT columns, allowing CREATE TABLE statements such as DISTRIBUTED BY HASH(jsonb_col) even though those types are rejected in key and partition paths. This change centralizes hash distribution type validation in HashDistributionInfo and reuses it when building catalog distribution info, including Nereids create-table execution after descriptor translation. Variant regression assertions are updated to expect the unified distribution-column error message. ### Release note Reject JSONB and VARIANT columns as hash distribution columns during CREATE TABLE analysis. ### Check List (For Author) - Test: Unit Test, static check, and Regression test attempt - Unit Test: mvn -pl fe-core -am -Dmaven.build.cache.enabled=false -Dtest=org.apache.doris.nereids.trees.plans.commands.info.DistributionDescriptorTest,org.apache.doris.nereids.trees.plans.CreateTableCommandTest#testAbnormal -DfailIfNoTests=false -Dfe_ut_parallel=0 test - Unit Test: mvn -pl fe-core -am -Dtest=org.apache.doris.catalog.CreateTableTest#testAbnormal -DfailIfNoTests=false -Dfe_ut_parallel=0 test - Static check: git diff --check - Regression test: ./run-regression-test.sh --run -d jsonb_p0 -s test_jsonb_distribution_column (attempted against the existing 127.0.0.1:9030 cluster; it failed because that cluster was not rebuilt from this branch and still accepted HASH(JSONB), confirmed by direct mysql SHOW CREATE TABLE) - Behavior changed: Yes. CREATE TABLE now rejects JSONB and VARIANT hash distribution columns. - Does this need documentation: No
CalvinKirs
commented
May 14, 2026
run buildall |
hello-stephen
commented
May 14, 2026
TPC-H: Total hot run time: 29533 ms |
hello-stephen
commented
May 14, 2026
TPC-DS: Total hot run time: 170629 ms |
hello-stephen
commented
May 14, 2026
TPC-H: Total hot run time: 29639 ms |
hello-stephen
commented
May 14, 2026
TPC-DS: Total hot run time: 172048 ms |
morrySnow
commented
May 14, 2026
/review |
There was a problem hiding this comment.
No blocking issues found in the changed files. The new centralized validation in HashDistributionInfo is used by HashDistributionDesc.toDistributionInfo(), so both catalog and Nereids create-table flows reject JSONB/VARIANT hash distribution columns before table creation. The regression and unit coverage exercise JSONB and VARIANT rejection paths, and the existing variant regression expectations are updated consistently.
Critical checkpoint conclusions:
- Goal/test coverage: The PR addresses the stated missing validation and adds targeted unit/regression tests. The regression test was reported as attempted but not successfully run on a rebuilt branch cluster.
- Scope/focus: The implementation is small and focused; it reuses the existing distribution conversion choke point instead of adding parallel checks.
- Concurrency/lifecycle/config/compatibility: No new concurrency, lifecycle, config, persistence, or wire/storage compatibility concerns identified.
- Parallel paths: Legacy catalog conversion and Nereids descriptor translation both reach HashDistributionDesc.toDistributionInfo(); no separate unchecked create-table path was found in the PR scope.
- Data correctness/error handling: Invalid distribution types fail with DdlException before metadata construction, avoiding persisted invalid table metadata.
- Observability/performance: No additional observability needed; no hot-path performance issue identified.
- User focus: No additional user-provided review focus was specified.
hello-stephen
commented
May 14, 2026
FE Regression Coverage ReportIncrement line coverage |
Uh oh!
There was an error while loading. Please reload this page.
Problem Summary: Hash distribution column validation missed JSONB and VARIANT columns, allowing CREATE TABLE statements such as DISTRIBUTED BY HASH(jsonb_col) even though those types are rejected in key and partition paths. This change centralizes hash distribution type validation and reuses it from both catalog and Nereids create-table paths. ### Release note Reject JSONB and VARIANT columns as hash distribution columns during CREATE TABLE analysis.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Hash distribution column validation missed JSONB and VARIANT columns, allowing CREATE TABLE statements such as DISTRIBUTED BY HASH(jsonb_col) even though those types are rejected in key and partition paths. This change centralizes hash distribution type validation and reuses it from both catalog and Nereids create-table paths.
Release note
Reject JSONB and VARIANT columns as hash distribution columns during CREATE TABLE analysis.
Check List (For Author)
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)