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

Sql. Usability of error message in case of numeric overflow

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • sql
    • Docs Required, Release Notes Required

    Description

      Let's consider error messages for the following queries:
      SELECT '1'::DECIMAL(3, 3)::VARCHAR;
      SELECT '-1'::DECIMAL(3, 3)::VARCHAR;
      SELECT '0.1'::DECIMAL(3, 4);

      Right now the queries expected to fail, but we have not so user-friendly error messages like a

       IGN-SQL-9 TraceId:0460f382-120f-49a4-9ee2-e09ee90d4764 Numeric field overflow

      For example, an error in PG looks so (seems need to look alternative in different DBs):

      ERROR: numeric field overflow DETAIL: A field with precision 3, scale 4 must round to an absolute value less than 10^-1.
       
      

      Let's improve error messages.

      Start point is using of

      org.apache.ignite.internal.sql.engine.prepare.IgniteSqlValidator#NUMERIC_FIELD_OVERFLOW_ERROR

      Attachments

        Activity

          People

            Unassigned Unassigned
            jooger Iurii Gerzhedovich
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: