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

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   ```
       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 some array to a list vector, everything 
is normal except case String. It just returns a empty list,which every 
elements' length is correct, 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: [email protected]

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

Reply via email to