Skip to content
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

[Bug] [seatunnel-connectors-v2] [connector-elasticsearch] 同步es array格式数据出错 #5792

Closed
2 of 3 tasks
klin-w opened this issue Nov 6, 2023 · 2 comments · Fixed by #5825
Closed
2 of 3 tasks
Labels

Comments

@klin-w
Copy link

klin-w commented Nov 6, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

同步数组格式时返回值只有一个值正确,其他值为null

SeaTunnel Version

2.3.3
2.3.2
2.3.1

SeaTunnel Config

key1 = "array<string>"

Running Command

sh apache-seatunnel-2.3.3/bin/seatunnel.sh --config test.config

Error Exception

返回值为null
{
"key1": ["value1", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]
}

Zeta or Flink or Spark Version

zeta

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@klin-w klin-w added the bug label Nov 6, 2023
@klin-w
Copy link
Author

klin-w commented Nov 6, 2023

目前发现代码bug
https://github.com/apache/seatunnel/blob/2.3.3-release/seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/serialize/source/DefaultSeaTunnelRowDeserializer.java
convertValue方法中
for (int i = 0; i < stringList.size(); i++) {
Object convertValue = convertValue(elementType, stringList.get(i));
Array.set(arr, 0, convertValue);
}
Array.set(arr, 0, convertValue);应该修改为Array.set(arr, i, convertValue);

@klin-w klin-w changed the title [Bug] [seatunnel-connectors-v2] [connector-elasticsearch]Bug title [Bug] [seatunnel-connectors-v2] [connector-elasticsearch] 同步es array格式数据出错 Nov 6, 2023
@Carl-Zhou-CN
Copy link
Member

@klin-w hi, this seems to be a bug, are you interested in fixing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants