[
https://issues.apache.org/jira/browse/IGNITE-19938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Mashenkov updated IGNITE-19938:
--------------------------------------
Description:
Now 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.
Also, 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.
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}
was:
Now 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.
Also, 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.
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.
> 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
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> Now 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.
> Also, 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.
> 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)