You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by vtygoss <vt...@126.com> on 2021/10/11 03:21:23 UTC

ArrayIndexOutOfBoundException when extracting keyField type during streaming join

Hi, community!


I met a problem: Flink Streaming SQL throw ArrayIndexOutOfBoundException when extracting keyField type at only two tables Join whatever cluster-mode is yarn-perjob or standalone. But sql works fine in Flink Batch Mode. 


exception stack: 




Source Code of KeySelectorUtil.java 


Source Code of StreamExecJoin.scala




I found it happened when extracting the data type of the PK of table. But sql "select sick_id, diagnosis_sequence, nullah_number from ... limit 10" works fine. 


I cann't find the solution, thanks for your any suggestions.


Best Regards!

Re: ArrayIndexOutOfBoundException when extracting keyField type during streaming join

Posted by JING ZHANG <be...@gmail.com>.
Hi, vtygoss
It seems a bug.
I guess something is wrong when infer the metadata smallest primary key.
Could you please provide your SQL and input table schema which could
reproduce the problem? It would be helpful to find the root cause of the
bug.
BTW, index of `ArrayIndexOutOfBoundException` may not directly mapping to
the field index of the original table `his_inpsick_diagonosis_record`
because some projects may be projected out by the SQL optimizer.

Best,
JING ZHANG

vtygoss <vt...@126.com> 于2021年10月11日周一 上午11:30写道:

> Hi, community!
>
>
> I met a problem: Flink Streaming SQL throw ArrayIndexOutOfBoundException
> when extracting keyField type at only two tables Join whatever cluster-mode
> is yarn-perjob or standalone. But sql works fine in Flink Batch Mode.
>
>
> exception stack:
>
>
>
> Source Code of KeySelectorUtil.java
>
>
> Source Code of StreamExecJoin.scala
>
>
>
> I found it happened when extracting the data type of the PK of table. But
> sql "select sick_id, diagnosis_sequence, nullah_number from ... limit 10"
> works fine.
>
>
> I cann't find the solution, thanks for your any suggestions.
>
>
> Best Regards!
>
>
>
>
>
>
>