Github user kiszk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18704#discussion_r135066290
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/compression/compressionSchemes.scala
 ---
    @@ -278,6 +555,46 @@ private[columnar] case object DictionaryEncoding 
extends CompressionScheme {
         }
     
         override def hasNext: Boolean = buffer.hasRemaining
    +
    +    override def decompress(columnVector: ColumnVector, capacity: Int): 
Unit = {
    +      val nullsBuffer = buffer.duplicate().order(ByteOrder.nativeOrder())
    +      nullsBuffer.rewind()
    +      val nullCount = ByteBufferHelper.getInt(nullsBuffer)
    +      var nextNullIndex = if (nullCount > 0) 
ByteBufferHelper.getInt(nullsBuffer) else -1
    +      var pos = 0
    +      var seenNulls = 0
    +      columnType.dataType match {
    +        case _: IntegerType =>
    +          while (pos < capacity) {
    +            if (pos != nextNullIndex) {
    +              val value = dictionary(buffer.getShort()).asInstanceOf[Int]
    +              columnVector.putInt(pos, value)
    --- End diff --
    
    done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to