Uploaded image for project: 'Pentaho Data Integration - Kettle'
  1. Pentaho Data Integration - Kettle
  2. PDI-5514

Partitioning on non-Integer columns in PDI sometimes causes an out-of-bounds exception

    XMLWordPrintable

    Details

    • 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.

      Description

      It happens because hashCode() is used to calculate the modulo in ModPartitioner.
      Apparently the remainder of a negative value is also a negative remainder (go figure). In certain cases where we want to partition on String values we can hit this problem.

      The solution is to Math.abs() the checksum value to always end up with a positive value.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cboyden Curtis Boyden (Inactive)
                Reporter:
                mcasters Matt Casters (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: