Skip to content

Commit

Permalink
[Feature][transform-v2] jsonpath support map array type
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmosNi committed Jan 26, 2025
1 parent 7674aa1 commit 7fb3cc4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,17 @@ private static SeaTunnelDataType<?> parseRowType(ConfigObject conf) {
ConfigValue typeVal = conf.get(fieldName);
switch (typeVal.valueType()) {
case STRING:
{
fieldTypes[idx] =
deserializeSeaTunnelDataType(
fieldNames[idx], (String) typeVal.unwrapped());
}
break;
{
fieldTypes[idx] =
deserializeSeaTunnelDataType(
fieldNames[idx], (String) typeVal.unwrapped());
}
break;
case OBJECT:
{
fieldTypes[idx] = parseRowType((ConfigObject) typeVal);
}
break;
{
fieldTypes[idx] = parseRowType((ConfigObject) typeVal);
}
break;
case LIST:
case NUMBER:
case BOOLEAN:
Expand Down Expand Up @@ -248,4 +248,4 @@ private static SeaTunnelDataType<?> parseDecimalType(String columnStr) {
int scale = Integer.parseInt(decimalInfos[1].replaceAll("\\D", ""));
return new DecimalType(precision, scale);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ public void testArrayType(TestContainer container) throws Exception {
container.executeJob("/json_path_transform/json_path_array_map.conf");
Assertions.assertEquals(0, execResult.getExitCode());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ private Object reconvertArray(WrappedArray.ofRef<?> arrayData, ArrayType<?, ?> a
}
return newArray;
}
}
}

0 comments on commit 7fb3cc4

Please sign in to comment.