github-actions[bot] commented on code in PR #69088:
URL: https://github.com/apache/doris/pull/69088#discussion_r4310013306
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/ColumnDefinition.java:
##########
@@ -427,6 +427,10 @@ private void validateInternal(boolean isOlap, Set<String>
keysSet, Set<String> c
} catch (Exception e) {
throw new AnalysisException(e.getMessage(), e);
}
+ if (!nestedColumn && type.isVariantType() && name.indexOf('.') != -1) {
Review Comment:
[P2] Scope the VARIANT name restriction to internal tables
This validator also runs for external ADD COLUMN with `isOlap=false`. On a
Paimon table configured for native VARIANT (e.g. Parquet), ``ALTER TABLE
paimon_catalog.db.t ADD COLUMN `v.x` VARIANT NULL`` previously reached
`PaimonConnectorMetadata.addColumn`, which maps VARIANT to Paimon's native type
and preserves the literal field name. Paimon's [pinned schema
API](https://github.com/apache/paimon/blob/release-1.4.2/paimon-api/src/main/java/org/apache/paimon/schema/SchemaChange.java#L107-L109)
treats that dotted name as one field, and its [field-name
validation](https://github.com/apache/paimon/blob/release-1.4.2/paimon-api/src/main/java/org/apache/paimon/types/RowType.java#L257-L270)
permits it. The new unconditional check rejects this supported external ALTER
before dispatch; batch ADD is affected too. Scope the internal-storage naming
rule to the applicable table types and add an external ALTER regression case.
--
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]