Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13825

Decimal columns in SQL result set have invalid precision and scale

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.10
    • sql
    • None

    Description

      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:

      create table person(id int, name character(10), age decimal(3,0), primary key (id));
      

      Java (from internal component)

      GridQueryFieldMetadata meta = kernal.query().getIndexing().resultMetaData(
              "PUBLIC", "select age from person;"
          ).iterator().next();
      
      assert meta.precision() == 3;
      assert meta.scale() == 0;
      

      Attachments

        Issue Links

          Activity

            People

              isapego Igor Sapego
              isapego Igor Sapego
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m