[
https://issues.apache.org/jira/browse/IGNITE-19938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evgeny Stanilovsky reassigned IGNITE-19938:
-------------------------------------------
Assignee: Evgeny Stanilovsky
> Add validation for columns parameters in Catalog.
> -------------------------------------------------
>
> Key: IGNITE-19938
> URL: https://issues.apache.org/jira/browse/IGNITE-19938
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Andrey Mashenkov
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> ColumnParams builder is not restrictive at all, and allows to create columns
> with invalid parameters.
> E.g. some types requires precision and/or scale, while this make no sense for
> the others.
> Some of our tests allows "undefined" values for precision/scale/length for
> any column type, which passes to the column descriptors as special value
> (zero) with no reason. They should be fixed as well.
> Also, we have multiple places where default and max prevision and scale are
> defined: in catalog, in schema (see NativeType) and in sql-engine modules.
> Let's make a single point of truth.
> Let's add parameters validation to builder and check precision/scale/length
> are valid values, regarding the actual column type, SQL standard document and
> that we may need different validation strategy for CREATE and ALTER commands.
> Startpoint is
> {code:java}
> CatalogUtils.fromParams(ColumnParams params)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)