hh-cn commented on PR #6077:
URL: https://github.com/apache/kyuubi/pull/6077#issuecomment-2320489697

   @beryllw @yaooqinn 
   
   I'm sorry to bother you, but it seems that this issue hasn't been fully 
resolved. The logic related to toRowBasedSet has been fixed, but in the 
toColumnBasedSet, the getColumnToList method still involves similar access to a 
non-IndexedSeq with val row = rows(idx). This results in significantly impacted 
serialization speed when Hive JDBC statements have a large fetchSize (> 300).
   
   > trait TColumnGenerator[RowT] extends TRowSetColumnGetter[RowT] {
   >   protected def getColumnToList[T](
   >       rows: Seq[RowT],
   >       ordinal: Int,
   >       defaultVal: T,
   >       convertFunc: (RowT, Int) => T = null): (JList[T], ByteBuffer) = {
   >     val rowSize = rows.length
   >     val ret = new JArrayList[T](rowSize)
   >     val nulls = new JBitSet()
   >     var idx = 0
   >     while (idx < rowSize) {
   >       val row = rows(idx)
   >       val isNull = isColumnNullAt(row, ordinal)
   >       if (isNull) {
   >         nulls.set(idx, true)
   >         ret.add(defaultVal)
   >       } else {
   >         val value = Option(convertFunc) match {
   >           case Some(f) => f(row, ordinal)
   >           case _ => getColumnAs[T](row, ordinal)
   >         }
   >         ret.add(value)
   >       }
   >       idx += 1
   >     }
   >     (ret, ByteBuffer.wrap(nulls.toByteArray))
   >   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to