[
https://issues.apache.org/jira/browse/IGNITE-13825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245250#comment-17245250
]
Pavel Tupitsyn commented on IGNITE-13825:
-----------------------------------------
[~isapego] LGTM. There is a build failure though - please check.
> Decimal columns in SQL result set have invalid precision and scale
> ------------------------------------------------------------------
>
> Key: IGNITE-13825
> URL: https://issues.apache.org/jira/browse/IGNITE-13825
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Affects Versions: 2.9
> Reporter: Igor Sapego
> Assignee: Igor Sapego
> Priority: Major
> Fix For: 2.10
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> If the SQL result set of contains Decimal column it now returns MAX_SHORT as
> precision and MAX_USHORT as scale, no matter what is the precision and scale
> of the original table column.
> SQL:
> {code:sql}
> create table person(id int, name character(10), age decimal(3,0), primary key
> (id));
> {code}
> Java (from internal component)
> {code:java}
> GridQueryFieldMetadata meta = kernal.query().getIndexing().resultMetaData(
> "PUBLIC", "select age from person;"
> ).iterator().next();
> assert meta.precision() == 3;
> assert meta.scale() == 0;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)