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

   ### What problem does this PR solve?
   
   Related PR: #69077 (branch-4.1 backport)
   
   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 restriction into shared column-definition validation so 
CREATE, single/batch ADD, and MODIFY enforce it consistently. Reject RENAME to 
a dotted VARIANT name before changing metadata, while preserving edit-log 
replay and nested-field semantics.
   
   Update both existing CREATE regression controls to match the shared VARIANT 
naming error, and assert the CREATE error in the FE SQL unit test. The previous 
generic CREATE-only expectation caused sql_create_time_range_table to fail even 
though the DDL was correctly rejected.
   
   ### 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: `./run-fe-ut.sh --run 
org.apache.doris.alter.VariantColumnNameTest` — passed (1 test, 0 
failures/errors; full wrapper exit 0 after FE packaging).
     - Master FE build and Checkstyle: `DISABLE_BUILD_UI=ON ./build.sh --fe 
--exclude-obs-dependencies` — passed; exclude OBS to avoid dependency 
repository validation stalls.
     - On both master and branch-4.1, run `sql_create_time_range_table` under 
`ddl_p0` and `test_variant_column_name` under `variant_p0/schema_change` with 
`run-regression-test.sh`: all four focused suite runs passed, 0 failures/skips. 
Each runtime used its branch's built FE and a prebuilt ASAN BE (326d74e175b); 
no BE source changed.
     - Branch-4.1 FE Checkstyle and `git diff --check`: passed.
   - Behavior changed: Yes; reject previously accepted invalid VARIANT column 
names. Dotted names of other types remain supported.
   - Does this need documentation: No; enforce the existing CREATE restriction 
consistently.
   
   Metadata / compatibility review: reject invalid names before catalog 
mutation; RENAME retains its write lock and replay behavior. Both local and 
cloud tables use the shared FE validation; no protocol or metadata format 
changes.
   


-- 
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