flink-user-zh mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benchao Li <libenc...@gmail.com>
Subject Re: 回复:数组越界
Date Mon, 18 May 2020 09:37:27 GMT
数组长度是运行时的问题,编译期并不知道数组的长度。而且现在好像也没有检查下标是不是合法(比如必须大于0)。我们以前也经常遇到这种问题。

allanqinjy <allanqinjy@163.com> 于2020年5月18日周一 下午5:15写道:

> 我觉得要是从1开始,那么编译的时候就应该报异常了,而不是提交作业运行报。
>
>
>
>
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 22369621
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.table.runtime.util.SegmentsUtil.getByteMultiSegments(SegmentsUtil.java:598)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.table.runtime.util.SegmentsUtil.getByte(SegmentsUtil.java:590)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.table.runtime.util.SegmentsUtil.bitGet(SegmentsUtil.java:534)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.table.dataformat.BinaryArray.isNullAt(BinaryArray.java:117)
> 18-05-2020 16:27:14 CST INFO -  at BatchCalc$822.processElement(Unknown
> Source)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.runtime.tasks.OperatorChain$ChainingOutput.pushToOperator(OperatorChain.java:550)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.runtime.tasks.OperatorChain$ChainingOutput.collect(OperatorChain.java:527)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.runtime.tasks.OperatorChain$ChainingOutput.collect(OperatorChain.java:487)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingBroadcastingOutputCollector.collect(OperatorChain.java:748)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingBroadcastingOutputCollector.collect(OperatorChain.java:734)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:730)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:708)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.operators.StreamSourceContexts$NonTimestampContext.collect(StreamSourceContexts.java:104)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.functions.source.InputFormatSourceFunction.run(InputFormatSourceFunction.java:93)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100)
> 18-05-2020 16:27:14 CST INFO -  at
> org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63)
>
>
>
>
>
>
>
>
> 在 2020-05-18 16:38:16,"1048262223" <1048262223@qq.com> 写道:
> >图看不到
> >flink内置udf和hive udf不同,有些udf下标是从1开始的
> >
> >
> >
> >
> >
> >
> >
> >
> >各位好,
> >&nbsp; &nbsp;
> &nbsp;flink1.10,在跑flink批量sql的适合语法通过没问题,在运行脚步的适合报错如下,hive脚步跑没有问题,不知道为什么flink
> 跑会报数组越界,这个是什么问题?
> >&nbsp; &nbsp; &nbsp;
> >
> >
> >
> >
> >&nbsp;
>


-- 

Benchao Li
School of Electronics Engineering and Computer Science, Peking University
Tel:+86-15650713730
Email: libenchao@gmail.com; libenchao@pku.edu.cn

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message