You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Igor Sapego (Jira)" <ji...@apache.org> on 2020/12/07 12:26:00 UTC

[jira] [Created] (IGNITE-13825) Decimal columns in SQL result set have invalid precision and scale

Igor Sapego created IGNITE-13825:
------------------------------------

             Summary: 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
             Fix For: 2.10


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)