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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Complex columns could be created or added with non-null 
string defaults such as ARRAY DEFAULT '[]'. The default value is stored as a 
literal string instead of a typed complex value, which makes CREATE TABLE, 
ALTER TABLE ADD COLUMN, and partial-update default behavior inconsistent. 
Reject non-null defaults for ARRAY, MAP, STRUCT, JSON, and VARIANT columns 
during column definition validation while preserving no default and explicit 
DEFAULT NULL. Update existing regression DDLs and expected outputs that 
previously relied on empty array defaults.
   
   ### Release note
   
   Reject non-null default literals for complex type columns.
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: ./run-fe-ut.sh --run 
org.apache.doris.nereids.trees.plans.commands.info.ColumnDefinitionTest
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
datatype_p0/complex_types -s test_complex_default_value
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
query_p0/expression -s test_default_expr
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d schema_change_p0 
-s test_alter_table_column
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
unique_with_mow_p0/partial_update -s 
test_primary_key_partial_update_default_value
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
unique_with_mow_p0/partial_update -s 
test_primary_key_partial_update_complex_type
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
unique_with_mow_c_p0/partial_update -s 
test_primary_key_partial_update_complex_type
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
query_p0/sql_functions/table_function -s explode
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d schema_change_p0 
-s test_dup_schema_key_add
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d schema_change_p0 
-s test_unique_schema_key_change_add
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d schema_change_p0 
-s test_agg_schema_key_add
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d schema_change_p0 
-s test_modify_struct
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
mysql_fulltext_array_contains -s load
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
nereids_function_p0 -s load
   - Behavior changed: Yes. Non-null default literals for complex columns are 
rejected.
   - Does this need documentation: No
   


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