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

   CREATE TABLE and CTAS share column validation in CreateTableInfo. Internal
   tables cannot store VARBINARY, while external connectors decide which types
   their destinations support.
   
   Issue Number: None
   Related PR: None
   PR Type: Bugfix
   
   Problem Summary:
   
   Common FE validation rejected VARBINARY columns for external catalogs before
   their connectors could validate them. Restrict the rejection to the internal
   catalog and remove the duplicate CTAS rejection. Most of the diff adds tests
   for both statements and both catalog kinds.
   
   - **Frequency:** Every external CREATE TABLE or CTAS with a top-level 
VARBINARY column.
   - **Root cause:** Both common validation gates rejected VARBINARY without 
checking the target catalog.
   - **Why existing tests missed it:** VARBINARY creation tests covered 
internal tables, while catalog-resolution tests did not cover VARBINARY columns.
   - **Fix:** Keep the restriction in CreateTableInfo.validate for internal 
targets and let CTAS reuse that validation.
   - **Other paths and branches:** CREATE TABLE and CTAS are covered; internal 
rejection and connector-specific support remain intact. This change targets 
master.
   - **Behavior change:** External VARBINARY columns reach connector validation 
instead of being rejected by fe-core.
   
   - Before the fix, the four new tests ran locally: both external cases failed 
with the reported error and both internal rejection cases passed.
   - On the original local master baseline, run-fe-ut.sh --run passed all 41 
tests in CreateTableVarBinaryTest, CreateTableCommandTest, CreateTableInfoTest, 
CreateTableInfoEngineCatalogTest, and VarBinaryLiteralParserTest.
   - The targeted FE tests are being rerun after rebasing onto current upstream 
master.
   - Maven checkstyle:check passed for all three changed Java files with zero 
violations. git diff --check passed.
   - No live external-catalog integration tests were run; the new tests use 
real SQL parsing and CTAS planning with a mocked external catalog.
   
   External catalog CREATE TABLE and CTAS now allow VARBINARY columns through
   common FE validation so connectors that support the type can create them.
   Internal tables continue to reject VARBINARY, and connector-specific type
   limitations still apply.
   
   - Behavior changed: Yes (see Details)
   - Does this need documentation: No
   - Pre-submission status: Partially verified: targeted FE unit tests and 
style checks passed; live external-catalog integration was not tested.
   
   - Tool: Codex (GPT-6)
   - Generated: Code, tests, and this description.
   - Human review: Pending.
   
   


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