alibaba / alibaba/DataX

elasticsearchwriter 下的 ESWriter.java 数组DATE问题

Open
#147 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
17.4k
Forks
5.7k
PR merge metrics
No merged PRs in 30d

Description

`if (columnList.get(i).isArray() != null && columnList.get(i).isArray()) {
String[] dataList = column.asString().split(splitter);
if (!columnType.equals(ESFieldType.DATE)) {
data.put(columnName, dataList);
} else {
for (int pos = 0; pos < dataList.length; pos++) {
dataList[pos] = getDateStr(columnList.get(i), column);
}
data.put(columnName, dataList);
}
}`
dataList[pos] = getDateStr(columnList.get(i), column);
最后一个参数不应该传入column,而应重新构建Column传入dataList的值
dataList[pos] = getDateStr(columnList.get(i), new StringColumn(dataList[pos]));

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the Elasticsearch writer's ESWriter.java and begin with the array-handling block shown in the issue. Trace how DATE array elements reach getDateStr, then verify that each element is converted from its own value rather than the original column. Done means DATE arrays are written with the correct converted value for every element.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, java
Domain
backend, databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.