Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6401

Precision for decimal data types may be lost for the case when cast with literal is used

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:

      Description

      For the case when cast with decimal literal is used and literal has less precision than specified in the casting type:

      SELECT cast('999.99' as decimal(9, 4)) decimal_9_4
      

      the precision in column metadata is incorrect: 7, but should be 9.

      Test which has the similar check PreparedStatementTest.testQueryMetadataInPreparedStatement is failed when it is ran separately.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vvysotskyi Volodymyr Vysotskyi
                Reporter:
                vvysotskyi Volodymyr Vysotskyi
                Reviewer:
                Arina Ielchiieva
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: