-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Fix][connector-elasticsearch] support elasticsearch nest type && spark with Array<map> #8492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
corgy-w
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good contribution,There is a small ut that needs to be added
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java
Outdated
Show resolved
Hide resolved
|
LGTM,Please @Hisoka-X review it |
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java
Outdated
Show resolved
Hide resolved
…rk with Array<map>
…rk with Array<map>
|
@Hisoka-X PTAL |
| if (((ArrayType<?, ?>) dataType).getElementType() instanceof MapType) { | ||
| Object arrayMap = | ||
| Array.newInstance(ArrayBasedMapData.class, ((Map[]) field).length); | ||
| for (int i = 0; i < ((Map[]) field).length; i++) { | ||
| Map<?, ?> value = (Map<?, ?>) ((Map[]) field)[i]; | ||
| MapType<?, ?> type = | ||
| (MapType<?, ?>) ((ArrayType<?, ?>) dataType).getElementType(); | ||
| Array.set(arrayMap, i, convertMap(value, type)); | ||
| } | ||
| return ArrayData.toArrayData(arrayMap); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
|
Overall LGTM. |
support elasticsearch nest type && spark with Array
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note.