Hisoka-X commented on code in PR #8462:
URL: https://github.com/apache/seatunnel/pull/8462#discussion_r1904970726


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/ArrayType.java:
##########
@@ -51,6 +51,10 @@ public class ArrayType<T, E> implements SeaTunnelDataType<T> 
{
     public static final ArrayType<LocalTimeType[], LocalTimeType> 
OFFSET_DATE_TIME_ARRAY_TYPE =
             new ArrayType(LocalTimeType[].class, 
LocalTimeType.OFFSET_DATE_TIME_TYPE);
 
+    public static final ArrayType<MapType[], MapType> MAP_ARRAY_TYPE =

Review Comment:
   I think the map array should be the same as the decimal type. We cannot 
define a universal static type, but it should be defined dynamically.



##########
seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/catalog/ElasticSearchTypeConverter.java:
##########
@@ -150,6 +149,9 @@ public Column convert(BasicTypeDefine<EsType> typeDefine) {
                                 });
                 builder.dataType(rowType);
                 break;
+            case EsType.NESTED:
+                builder.dataType(ArrayType.MAP_ARRAY_TYPE);

Review Comment:
   ```suggestion
                   builder.dataType(new ArrayType<>(Map[].class, new 
MapType<>(BasicType.STRING_TYPE, BasicType.STRING_TYPE)));
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to