-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][client] Support LocalDateTime Conversion #18334
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
1a5cd93 to
5f845ec
Compare
| reflectData.addLogicalTypeConversion(new TimeConversions.LocalTimestampMicrosConversion()); | ||
| reflectData.addLogicalTypeConversion(new TimeConversions.LocalTimestampMillisConversion()); |
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.
why weren't these put under the if statement if (jsr310ConversionEnabled) { ?
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.
Because there is no Joda time conversion of local-timestamp-millis and local-timestamp-micros, I think don't need to judge jsr310ConversionEnabled.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #18334 +/- ##
============================================
+ Coverage 39.98% 45.47% +5.49%
- Complexity 8590 10700 +2110
============================================
Files 685 752 +67
Lines 67335 72525 +5190
Branches 7216 7792 +576
============================================
+ Hits 26924 32983 +6059
+ Misses 37392 35854 -1538
- Partials 3019 3688 +669
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5f845ec to
7882a4d
Compare
| } catch (ClassNotFoundException e) { | ||
| // Skip if have not provide joda-time dependency. | ||
| } | ||
| reflectData.addLogicalTypeConversion(new TimeConversions.TimestampMicrosConversion()); |
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.
Should be able to move to line 134, otherwise we will not be able to parse timestamp-micros type when jsr310ConversionEnabled == true.
|
/pulsarbot run-failure-checks |
|
@lhotari please take a look again. |
* Support LocalDateTime Conversion * move `TimestampMicrosConversion` to correct line (cherry picked from commit b31c5a6)
* Support LocalDateTime Conversion * move `TimestampMicrosConversion` to correct line (cherry picked from commit b31c5a6)
* Support LocalDateTime Conversion * move `TimestampMicrosConversion` to correct line (cherry picked from commit b31c5a6)
* Support LocalDateTime Conversion * move `TimestampMicrosConversion` to correct line (cherry picked from commit b31c5a6)
* Support LocalDateTime Conversion * move `TimestampMicrosConversion` to correct line
Fixes #18329
Motivation
Due to missing LocalDateTime ConVersion, the decode
java.time.LocalDateTimefailure.Modifications
Add
LocalTimestampMicrosConversionandLocalTimestampMillisConversionfor AvroSchema.Verifying this change
This change added tests and can be verified as follows:
testLocalDateTime
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: