1032851561 opened a new pull request, #8098:
URL: https://github.com/apache/hudi/pull/8098

   ### Change Logs
   
   The computed column(eg : process_time as proctime() ) will cause a select 
exception because it is not included in the data file schema, so we need to 
ignore the computed column
   
   
   ### Problem 
   ```
   create table if not exists ods_test_hudi (
       `id` int,
       `name` string,
       `create_date` timestamp(3),
       `process_time` AS PROCTIME(),   
       PRIMARY KEY(`id`) NOT ENFORCED
   )
   WITH (
       'connector'='hudi',
       'table.type'='MERGE_ON_READ'
   )
   env.sqlQuery("select * from ods_test_hudi /*+ 
OPTIONS('read.start-commit'='earliest')*/").execute().print();
   ```
   exception:
   
   ```
    
    Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
        at 
org.apache.hudi.table.format.cow.ParquetSplitReaderUtil.lambda$genPartColumnarRowReader$0(ParquetSplitReaderUtil.java:118)
        at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
        at 
java.util.Spliterators$IntArraySpliterator.forEachRemaining(Spliterators.java:1032)
        at java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:693)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at 
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at 
java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at 
org.apache.hudi.table.format.cow.ParquetSplitReaderUtil.genPartColumnarRowReader(ParquetSplitReaderUtil.java:120)
   ```
   
   
   ### Risk level (write none, low medium or high below)
   none
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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