Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-896

Oracle integer columns overflow if value >2^31



    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.2.1 GA (3.7.0 GA Suite Release)
    • Component/s: None
    • Labels:
    • Customer Case:
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • QA Validation Status:


      Oracle integer columns overflow if the value is greater than 2^31.

      This is because Mondrian assumes that a NUMBER(38, 0) column in Oracle is intended to hold an integer. 99% of the time, this is valid; and users would be glad that Mondrian is using a Java int value rather than a BigDecimal, which is what comes back from Oracle's JDBC driver. 1% of the time, the number really is larger than an int can hold.

      The solution is to allow the schema designer to specify the type that Mondrian is to use internally. Add an attribute, 'internalType', of element type Level. Valid values int, long, BigDecimal, double, String, Object. If specified, Mondrian would not try to guess the type [see the method mondrian.rolap.SqlStatement.guessType].

      They also imply that Mondrian would call java.sql.ResultSet.getXxx to get the column value. (Some drivers return different values for getString versus getObject; that's why it's useful to have separate String and Object type.)

      The Level@internalType attribute would be immediately deprecated. We don't guarantee that it will be available in mondrian-4. But we will replace it with equivalent functionality.


          Issue Links



              • Assignee:
                jtcornelius Jake Cornelius (Inactive)
                jhyde Julian Hyde (Inactive)
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: