Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18704#discussion_r139364602
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/compression/compressionSchemes.scala
 ---
    @@ -169,6 +267,125 @@ private[columnar] case object RunLengthEncoding 
extends CompressionScheme {
         }
     
         override def hasNext: Boolean = valueCount < run || buffer.hasRemaining
    +
    +    override def decompress(columnVector: WritableColumnVector, 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
    +      var runLocal = 0
    +      var valueCountLocal = 0
    +      columnType.dataType match {
    +        case _: BooleanType =>
    --- End diff --
    
    same here, can we reduce code duplication?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to