Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-406

ORC: Char(n) and Varchar(n) writers truncate to n bytes & corrupts multi-byte data

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.3, 1.6.0
    • Component/s: None
    • Labels:
      None

      Description

      https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/writer/CharTreeWriter.java#L41

          itemLength = schema.getMaxLength();
          padding = new byte[itemLength];
        }
      

      https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/impl/writer/VarcharTreeWriter.java#L48

            if (vector.noNulls || !vector.isNull[0]) {
              int itemLength = Math.min(vec.length[0], maxLength);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gopalv Gopal Vijayaraghavan
                Reporter:
                gopalv Gopal Vijayaraghavan
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: