-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Fix][Connector-V2][ES]source deserializer error and inappropriate #4233
Conversation
e2e for es seems to be problematic |
Yup, it seems that this change effect the origin test cases. |
Can you fix e2e for this? Thanks |
@Hisoka-X ok, I'll fix it in the next pr |
ok for me, but we will waiting all ci pass to merge this PR. |
CI also has some problems: |
@iture123 PTAL. |
Yes, I'm testing locally |
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.
LGTM
cc @iture123 PTAL |
@TyrantLucifer @Hisoka-X This conflict is caused by the different ways of processing data types that es is not mapped to. The processing logic of the dev branch throws an exception, but I think this method is not very friendly. Is it better to give a default type user experience |
Please fix the conflicts |
@EricJoy2048 fixed |
@@ -150,7 +158,8 @@ Object convertValue(SeaTunnelDataType<?> fieldType, String fieldValue) | |||
LocalDateTime localDateTime = parseDate(fieldValue); | |||
return localDateTime.toLocalTime(); | |||
} else if (LocalTimeType.LOCAL_DATE_TIME_TYPE.equals(fieldType)) { |
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.
ES support Multiple date formats, and you should enhance it without removing the old implementation.ES date type can be defined as follows
{
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
…e is epoch_millis
@iture123 there is indeed a problem, I have moved the logic of timestamp processing into |
apache#4233) * [Fix][Connector-V2][ES]source deserializer error and inappropriate * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [Fix][Connector-V2][ES]es special types may result in a null pointer. e.g. ip type * [Fix][Connector-V2][ES]fix the parsing exception when the es time type is epoch_millis
apache#4233) * [Fix][Connector-V2][ES]source deserializer error and inappropriate * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [WIP][Connector-V2][ES]try fix e2e * [Fix][Connector-V2][ES]es special types may result in a null pointer. e.g. ip type * [Fix][Connector-V2][ES]fix the parsing exception when the es time type is epoch_millis
Purpose of this pull request
for timestamp type data this is wrong
The error message is as follows
Therefore, for the timestamp type, it should be parsed into LocalDateTime like this
string parse inappropriate
It is inappropriate to directly call
toString()
for string type data, and the sink will receive redundant"
final
The current pr has already dealt with the above problems, and the final effect is as follows
Check list
New License Guide
release-note
.