Skip to content

Commit

Permalink
[BugFix] Remove column name check for arrow
Browse files Browse the repository at this point in the history
Signed-off-by: PengFei Li <[email protected]>
  • Loading branch information
banmoy committed Apr 4, 2024
1 parent 7d6496d commit 51d7865
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package com.starrocks.connector.flink.row.source;

import org.apache.flink.table.data.GenericRowData;
import org.apache.flink.util.Preconditions;

import com.starrocks.connector.flink.table.source.struct.ColumnRichInfo;
import com.starrocks.connector.flink.table.source.struct.SelectColumn;
Expand Down Expand Up @@ -97,10 +96,6 @@ private void initFiledConverters(List<ArrowFieldConverter> fieldConverters) {
for (int i = 0; i < schema.getFields().size(); i++) {
Field field = schema.getFields().get(i);
ColumnRichInfo flinkColumn = columnRichInfos.get(selectedColumns[i].getColumnIndexInFlinkTable());
Preconditions.checkState(field.getName().equals(flinkColumn.getColumnName()),
"The fields at position %s are not same between arrow and flink schemas. " +
"Arrow field name is %s, and flink field name is %s.",
i, field.getName(), flinkColumn.getColumnName());
ArrowFieldConverter converter = ArrowFieldConverter.createConverter(
flinkColumn.getDataType().getLogicalType(), field);
fieldConverters.add(converter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void testArrayType() throws Exception {
tEnv.executeSql(createSrcSQL);
List<Row> results =
CollectionUtil.iteratorToList(
tEnv.executeSql("SELECT * FROM sr_src").collect());
tEnv.executeSql("SELECT * FROM sr_src WHERE c0 = 0").collect());
Row row = Row.of(
0,
new Boolean[] {true},
Expand Down

0 comments on commit 51d7865

Please sign in to comment.