sxh-lsc opened a new issue, #214:
URL: https://github.com/apache/arrow-java/issues/214

   ```
       def writeListVector(writer: UnionListWriter, arr: Array[_], pose: Int): 
Unit = {
         writer.startList()
         writer.setPosition(pose)
         arr.foreach {
           case e: Short => writer.smallInt().writeSmallInt(e)
           case e: Int => writer.integer().writeInt(e)
           case e: Byte => writer.writeTinyInt(e)
           case e: String =>
             val rootAllocator = new RootAllocator()
             val tempBuf = rootAllocator.buffer(2048)
             val bytes = e.getBytes(StandardCharsets.UTF_8)
             tempBuf.setBytes(0, bytes, 0, bytes.length)
             writer.varChar().writeVarChar(0, bytes.length, tempBuf)
           }
         writer.setValueCount(arr.length)
         writer.endList()
       }
   ````  
   I use a function like above to write an array to a list vector, everything 
is normal except case String. It just returns a empty string list,which every 
elements' length is correct, like:
   `[["", ""], [""], ["", "", ""]]`
   can somebody help me?
   
   
   
   ### Component(s)
   
   Java


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to