github-actions[bot] commented on code in PR #71007:
URL: https://github.com/apache/doris/pull/71007#discussion_r4690952648
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java:
##########
@@ -481,6 +481,12 @@ public void validate(ConnectContext ctx) {
throw new AnalysisException("Disable to create table with
`DECIMAL` type columns,"
+ "please use `DECIMALV3`.");
}
+ DataType type = columnDef.getType();
+ if (type instanceof VariantType && ((VariantType)
type).isExecutionV2()
+ && ((VariantType) type).hasDecimal256Template()) {
Review Comment:
[P2] Share the template guard with ALTER ADD COLUMN validation
With `enable_variant_v2=true` and `enable_decimal256=true`, `ALTER TABLE t
ADD COLUMN v VARIANT<'amount':DECIMAL(39,2)> NULL` on a light-schema-change
table still succeeds: `AddColumnOp.validateColumnDef()` and `AddColumnsOp` call
`ColumnDefinition.validate()` directly, bypassing this loop, while the common
subtype validation still permits Decimal256. Loading a nonnull matching amount
then stores it as Decimal256, and reading the whole `v` reaches
`append_materialized_value()`, which returns `NotSupported` for
`TYPE_DECIMAL256`; sparse reconstruction has the same rejection. Please
move/share this V2-specific check into column/type validation used by CREATE
and ADD COLUMN(S), and add negative ALTER coverage while preserving V1 support.
--
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]