Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15987

Replace ColumnVector.isNull boolean[] impl. with BitSet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Vectorization

    Description

      Most of data operations in Hive uses null operations. The current implementation of ColumnVector.isNull uses a boolean array, which uses 8 bits per 1 boolean. BitSet is a more compact representation, as it uses 1 bit per 1 boolean with a backing long array. Also logical operations between longs are much faster than ones with bytes as it uses less instructions per byte. So it will bring 8x or more performance for null operations.

      However, there also are several cases that will make this improvement slow. Such as simple reads will require more instructions per row. So it should include benchmark tests to show its performance impact.

      Attachments

        Activity

          People

            Unassigned Unassigned
            teddy.choi Teddy Choi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: