From 51cc562b8ec106185938c4078d1fb29ef159aec1 Mon Sep 17 00:00:00 2001 From: kino Date: Sat, 13 Jul 2024 01:06:36 +0800 Subject: [PATCH] [BugFix] Causing index out of bounds (#373) Signed-off-by: kino --- .../connector/flink/row/source/StarRocksSourceFlinkRows.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/starrocks/connector/flink/row/source/StarRocksSourceFlinkRows.java b/src/main/java/com/starrocks/connector/flink/row/source/StarRocksSourceFlinkRows.java index 8e748ae3..054080ca 100644 --- a/src/main/java/com/starrocks/connector/flink/row/source/StarRocksSourceFlinkRows.java +++ b/src/main/java/com/starrocks/connector/flink/row/source/StarRocksSourceFlinkRows.java @@ -70,7 +70,7 @@ public void init(List fieldConverters) throws IOException { for (int i = 0; i < rowCountOfBatch; i ++) { sourceFlinkRows.add(new GenericRowData(this.selectedColumns.length)); } - for (int i = 0; i < fieldVectors.size(); i++) { + for (int i = 0; i < selectedColumns.length; i++) { FieldVector fieldVector = fieldVectors.get(i); ArrowFieldConverter converter = fieldConverters.get(i); for (int rowIndex = 0; rowIndex < rowCountOfBatch; rowIndex++) {