Skip to content

Commit

Permalink
Fix a typo
Browse files Browse the repository at this point in the history
Signed-off-by: Jiandong Chen <[email protected]>
  • Loading branch information
jiandongchen committed Apr 18, 2024
1 parent ba84f11 commit 67bd107
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Object[] transform(RowData record, boolean supportUpsertDelete) {
Object[] values = new Object[columnDataTypes.length + (supportUpsertDelete ? 1 : 0)];
int idx = 0;
for (DataType dataType : columnDataTypes) {
values[idx] = typeConvertion(dataType.getLogicalType(), transformRecord, idx);
values[idx] = typeConversion(dataType.getLogicalType(), transformRecord, idx);
idx++;
}
if (supportUpsertDelete) {
Expand All @@ -103,7 +103,7 @@ public Object[] transform(RowData record, boolean supportUpsertDelete) {
return values;
}

private Object typeConvertion(LogicalType type, RowData record, int pos) {
private Object typeConversion(LogicalType type, RowData record, int pos) {
if (record.isNullAt(pos)) {
return null;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ private Object typeConvertion(LogicalType type, RowData record, int pos) {
RowType rType = (RowType)type;
Map<String, Object> m = new HashMap<>();
RowData row = record.getRow(pos, rType.getFieldCount());
rType.getFields().parallelStream().forEach(f -> m.put(f.getName(), typeConvertion(f.getType(), row, rType.getFieldIndex(f.getName()))));
rType.getFields().parallelStream().forEach(f -> m.put(f.getName(), typeConversion(f.getType(), row, rType.getFieldIndex(f.getName()))));
if (columns == null) {
return m;
}
Expand All @@ -196,7 +196,7 @@ private List<Object> convertNestedArray(ArrayData arrData, LogicalType type) {
// parse nested row data
return data.parallelStream().map(row -> {
Map<String, Object> m = Maps.newHashMap();
rType.getFields().parallelStream().forEach(f -> m.put(f.getName(), typeConvertion(f.getType(), (RowData)row, rType.getFieldIndex(f.getName()))));
rType.getFields().parallelStream().forEach(f -> m.put(f.getName(), typeConversion(f.getType(), (RowData)row, rType.getFieldIndex(f.getName()))));
return jsonWrapper.toJSONString(m);
}).collect(Collectors.toList());
}
Expand Down

0 comments on commit 67bd107

Please sign in to comment.