misi1987107 commented on issue #8689:
URL: https://github.com/apache/seatunnel/issues/8689#issuecomment-2943842460

   I generated the ORC file using a Java program, and the program is as follows
   `public static void main(String[] args) throws Exception {
           Path testFilePath = new Path("/tmp/abc.orc");
           Configuration conf = new Configuration();
           TypeDescription schema = 
TypeDescription.fromString("struct<field1:int,field2:int,field3:int>");
           Writer writer = OrcFile.createWriter(testFilePath, 
OrcFile.writerOptions(conf).setSchema(schema).compress(CompressionKind.SNAPPY));
           VectorizedRowBatch batch = schema.createRowBatch();
           LongColumnVector first = (LongColumnVector) batch.cols[0];
           LongColumnVector second = (LongColumnVector) batch.cols[1];
           LongColumnVector third = (LongColumnVector) batch.cols[2];
           long num = 2000000000L;
           final int BATCH_SIZE = batch.getMaxSize();
           for (int r = 0; r < num; ++r) {
               int row = batch.size++;
               first.vector[row] = r;
               second.vector[row] = r * 3;
               third.vector[row] = r * 6;
               if (row == BATCH_SIZE - 1) {
                   writer.addRowBatch(batch);
                   batch.reset();
               }
           }
           if (batch.size != 0) {
               writer.addRowBatch(batch);
               batch.reset();
           }
           writer.close();
       }`
   


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