Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5283

Add conversion from char to decimal

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 22.08.2
    • 23.10
    • PrimProc
    • None

    Description

      Currently, TreeNode::getDecimalVal() throws an error if called for a char type. We can implement a conversion function and throw ERR_FUNC_OUT_OF_RANGE_RESULT if it won't fit into a 128 bit decimal.

      Part of this feature is to find all the places where conversion is from char to double when conversion to 128 bit decimal would be more accurate. That is, find where TreeNode::getDoubleVal() is called for CHAR types and replace with TreeNode::getDecimalVal() where appropriate.

      Also look for other possible conversion from string that would be better server with decimal.

      This feature adds 128 bit precision where currently, only double precision is used. Care must be taken to possibly keep the double if the char value won't fit into a decimal 128.

      In SQL, it's inadvisable to use char types to hold numeric values that might actually be used as numeric, such as for calculations or as parameters to functions that act on numbers. Such conversions only serve to slow down processing and may result in loss of accuracy.

      Attachments

        Issue Links

          Activity

            People

              maxmether Max Mether
              David.Hall David Hall (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.