1.10版本中发现连续Join时抛出数组越界异常
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- stream-processing
Research direction
Start in com.dtstack.flink.sql.side.ParserJoinField, specifically getAllField(JoinScope scope) around lines 124-127, and reproduce the reported query with two joins to the same dimension table. Compare field.getFieldNames() with field.getTotalFields() when the field contains a Row, then verify that the query no longer raises an array-index error.
Written by the indexing model from the issue text.
Description
我将flinkStreamSql从1.8.1升级到1.10,原来可以运行的Join语句出错了。
tableA是源表, tableB 是维表,执行下面的语句
CREATE VIEW v_a_join_b AS
SELECT A.col_a1,A.col_a2,A.col_a3,B1.col_b as col_b1,B2.col_b as col_b2
FROM tableA AS A
LEFT JOIN tableB AS B1 ON A.col_a1 = B1.col_b
LEFT JOIN tableB AS B2 ON A.col_a2 = B2.col_b;
在com.dtstack.flink.sql.side.ParserJoinField类的
private static List getAllField(JoinScope scope) 方法中
会出现124行,String[] fieldNames = field.getFieldNames(); 只有两个字段f1,f2,其中f1是true,f2是Row其实包含了很多字段。 但是在126行,field.getTotalFields()会是实际包含的字段数,这样在127行, String fieldName = fieldNames[i]; 就会抛出数组越界的异常。 这个问题只在 多次Join需要进行表转流,流转表的时候才会遇到。

- Dominant language
- Java
- Stars
- 2k
- Forks
- 913
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DTStack/flinkStreamSQL
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
DTStack/flinkStreamSQL#467 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
DTStack/flinkStreamSQL#437 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
DTStack/flinkStreamSQL#432 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
DTStack/flinkStreamSQL#431 ·
-
有无对sql 语法校验的方法 Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
DTStack/flinkStreamSQL#430 · 1 comment ·
All issues in DTStack/flinkStreamSQL
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100