You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Ethan Guo (Jira)" <ji...@apache.org> on 2023/02/16 07:17:00 UTC

[jira] [Updated] (HUDI-5302) Can't insert into table with bucket index type if record key value contains ","

     [ https://issues.apache.org/jira/browse/HUDI-5302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ethan Guo updated HUDI-5302:
----------------------------
    Fix Version/s: 0.13.0

> Can't insert into table with bucket index type if record key value contains "," 
> --------------------------------------------------------------------------------
>
>                 Key: HUDI-5302
>                 URL: https://issues.apache.org/jira/browse/HUDI-5302
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: core
>            Reporter: jimmyz
>            Assignee: jimmyz
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.13.0
>
>
> h5. Exception:
> {code:java}
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
> 	at org.apache.hudi.index.bucket.BucketIdentifier.lambda$getHashKeysUsingIndexFields$2(BucketIdentifier.java:75)
> 	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
> 	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
> 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
> 	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
> 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
> 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
> 	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:566)
> 	at org.apache.hudi.index.bucket.BucketIdentifier.getHashKeysUsingIndexFields(BucketIdentifier.java:75)
> 	at org.apache.hudi.index.bucket.BucketIdentifier.getHashKeys(BucketIdentifier.java:69)
> 	at org.apache.hudi.index.bucket.BucketIdentifier.getBucketId(BucketIdentifier.java:47)
> 	at org.apache.hudi.index.bucket.HoodieSimpleBucketIndex$SimpleBucketIndexLocationMapper.getRecordLocation(HoodieSimpleBucketIndex.java:94)
> 	at org.apache.hudi.index.bucket.HoodieBucketIndex$1.computeNext(HoodieBucketIndex.java:83)
> 	at org.apache.hudi.index.bucket.HoodieBucketIndex$1.computeNext(HoodieBucketIndex.java:78)
> 	at org.apache.hudi.client.utils.LazyIterableIterator.next(LazyIterableIterator.java:119)
> {code}
> h5.  
> h5. Reproduce step:
> #Create table
> {code:java}
> create table db.table (
>   id int,
>   dt string,
>   name string,
>   price double,
>   ts long
> ) using hudi
>  tblproperties (primaryKey = 'id,name',
>   hoodie.index.type = 'BUCKET',
>   hoodie.bucket.index.hash.field = 'id,name')
>  partitioned by (dt)
> {code}
> #Insert data
> {code:java}
> insert into db.table values (1, 'a1,1', 10, 1000, "2021-01-05") {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)