pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][client] Support LocalDateTime Conversion

Open coderzc opened this issue 3 years ago • 1 comments
trafficstars

Fixes #18329

Motivation

Due to missing LocalDateTime ConVersion, the decode java.time.LocalDateTime failure.

Modifications

Add LocalTimestampMicrosConversion and LocalTimestampMillisConversion for AvroSchema.

Verifying this change

  • [x] Make sure that the change passes the CI checks.

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

  • [ ] Dependencies (add or upgrade a dependency)
  • [ ] The public API
  • [x] The schema
  • [ ] The default values of configurations
  • [ ] The threading model
  • [ ] The binary protocol
  • [ ] The REST endpoints
  • [ ] The admin CLI options
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository:

coderzc avatar Nov 04 '22 04:11 coderzc

Codecov Report

Merging #18334 (6cf9cb6) into master (fe19639) will increase coverage by 5.49%. The diff coverage is 100.00%.

Impacted file tree graph

@@             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     
Flag Coverage Δ
unittests 45.47% <100.00%> (+5.49%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/apache/pulsar/client/impl/schema/AvroSchema.java 80.70% <100.00%> (+80.70%) :arrow_up:
...roker/service/persistent/MessageDeduplication.java 47.16% <0.00%> (-6.56%) :arrow_down:
...oker/service/schema/SchemaRegistryServiceImpl.java 60.66% <0.00%> (-3.61%) :arrow_down:
...ersistentStickyKeyDispatcherMultipleConsumers.java 57.69% <0.00%> (-1.93%) :arrow_down:
...ervice/AbstractDispatcherSingleActiveConsumer.java 69.15% <0.00%> (-1.87%) :arrow_down:
...ice/persistent/PersistentMessageExpiryMonitor.java 43.75% <0.00%> (-1.05%) :arrow_down:
...sar/broker/service/persistent/PersistentTopic.java 61.24% <0.00%> (-0.49%) :arrow_down:
...ker/service/persistent/PersistentSubscription.java 68.11% <0.00%> (-0.49%) :arrow_down:
...broker/service/schema/BookkeeperSchemaStorage.java 73.92% <0.00%> (-0.31%) :arrow_down:
...ava/org/apache/pulsar/broker/service/Producer.java 63.90% <0.00%> (-0.30%) :arrow_down:
... and 264 more

codecov-commenter avatar Nov 04 '22 09:11 codecov-commenter

/pulsarbot run-failure-checks

coderzc avatar Nov 07 '22 08:11 coderzc

@lhotari please take a look again.

coderzc avatar Nov 08 '22 04:11 coderzc