imhy commented on issue #966:
URL: https://github.com/apache/arrow-java/issues/966#issuecomment-3803329898

   This example working on 
   JDK 17 with arrow-java 17.0.0 
   JDK8 with arrow-java15.0.0 
   But not worked on JDK8 with arrow-java 17.0.0 
   
   ```java import org.apache.arrow.memory.BufferAllocator;
   import org.apache.arrow.memory.RootAllocator;
   import org.apache.arrow.vector.VarCharVector;
   
   import java.nio.ByteBuffer;
   import java.nio.charset.StandardCharsets;
   
   public class ArrowJavaCompat {
     public static void main(String[] args) {
       try (
           BufferAllocator allocator = new RootAllocator();
           VarCharVector stringVector = new VarCharVector("varchar-vector", 
allocator);
       ) {
         byte[] helloBytes = "hello".getBytes(StandardCharsets.UTF_8);
         ByteBuffer helloBuffer = ByteBuffer.wrap(helloBytes);
         stringVector.allocateNew(1);
         stringVector.setSafe(0, helloBuffer, 0, helloBytes.length);
         stringVector.setValueCount(1);
         System.out.println("Vector created in memory: " + stringVector);
       }
     }
   }
   ```
   


-- 
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