eldenmoon opened a new pull request, #69077:
URL: https://github.com/apache/doris/pull/69077

   ### What problem does this PR solve?
   
   Problem Summary: CREATE TABLE rejected top-level VARIANT column names 
containing a dot, but ALTER TABLE ADD COLUMN could persist the same invalid 
schema. Move the check into the shared column-definition validation so CREATE, 
single/batch ADD, and MODIFY enforce the same restriction. Reject RENAME to a 
dotted VARIANT name before changing metadata, without changing edit-log replay. 
Nested fields and dotted names of other types retain their existing behavior.
   
   Metadata / compatibility review: validation rejects invalid names before 
catalog mutation; RENAME retains the existing write lock and edit-log replay 
behavior. The shared FE path covers both local and cloud tables without FE/BE 
protocol or metadata-format changes.
   
   ### Release note
   
   Reject ALTER TABLE operations that introduce a top-level VARIANT column name 
containing a dot.
   
   ### Check List (For Author)
   
   - Test: FE SQL unit test reproduces the bug before the fix and checks 
rejection of ADD, batch ADD, MODIFY, and RENAME, unchanged catalog metadata 
after rejection, and accepted normal VARIANT/dotted STRING operations. The new 
regression suite is added for CI and has not been run on a full FE/BE cluster.
   - FE unit test: `./run-fe-ut.sh --run 
org.apache.doris.alter.VariantColumnNameTest` — before fix: 1 failure (ALTER 
ADD accepted the dotted name); after fix: 1 test passed, 0 failures/errors.
   - FE build / Checkstyle: `DISABLE_BUILD_UI=ON ./build.sh --fe` — passed 
(exit 0, Successfully build Doris); FE Checkstyle reports 0 violations.
   - `git diff --check`: passed.
   - Behavior changed: Yes; previously accepted invalid VARIANT names are 
rejected.
   - Does this need documentation: No; enforce the existing CREATE TABLE 
restriction consistently.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to