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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 1.5.3, 1.6.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: