Skip to content

Conversation

@CosmosNi
Copy link
Contributor

@CosmosNi CosmosNi commented Jan 6, 2025

elasticsearch support nested type
#8454

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@zhangshenghang
Copy link
Member

Please resolve the conflict

# Conflicts:
#	seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/ArrayType.java
…_es_nest_type

# Conflicts:
#	seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/ArrayType.java
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 =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

builder.dataType(rowType);
break;
case EsType.NESTED:
builder.dataType(ArrayType.MAP_ARRAY_TYPE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
builder.dataType(ArrayType.MAP_ARRAY_TYPE);
builder.dataType(new ArrayType<>(Map[].class, new MapType<>(BasicType.STRING_TYPE, BasicType.STRING_TYPE)));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if ci passes. cc @zhangshenghang

@hailin0 hailin0 merged commit eaa15e4 into apache:dev Jan 7, 2025
2 of 3 checks passed
Hisoka-X added a commit to Hisoka-X/seatunnel-fork that referenced this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants