Skip to content

Conversation

@cbornet
Copy link
Contributor

@cbornet cbornet commented May 30, 2022

Motivation

Improves test coverage

Modifications

Added a test

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

Run JsonConverterTests

Does this pull request potentially affect one of the following parts:

no

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    fix

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 30, 2022
@nicoloboschi
Copy link
Contributor

@cbornet isn't it the same of #15432 ?

@cbornet
Copy link
Contributor Author

cbornet commented May 31, 2022

@cbornet isn't it the same of #15432 ?

Yes it is. Sorry I hadn't seen it.
I'll modify it to only keep the unit test

@cbornet cbornet marked this pull request as draft May 31, 2022 08:49
@cbornet cbornet force-pushed the kinesis-jsonconverter branch from aef9aaa to 2ff92d6 Compare May 31, 2022 08:54
@cbornet cbornet changed the title [fix][kinesis-sink] Handle Avro collections native types (GenericDataArray and Utf8 map keys) [improve][kinesis-sink] Add unit test for Kinesis sink JsonConverter May 31, 2022
@cbornet cbornet force-pushed the kinesis-jsonconverter branch from 2ff92d6 to 06b473a Compare May 31, 2022 14:33
@cbornet cbornet marked this pull request as ready for review May 31, 2022 14:34
@cbornet
Copy link
Contributor Author

cbornet commented May 31, 2022

/pulsarbot rerun-failure-checks

@Test
public void testAvroToJson() throws IOException {
Schema avroArraySchema = SchemaBuilder.array().items(SchemaBuilder.builder().stringType());
Schema schema = SchemaBuilder.record("record").fields()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion adds Logical type test. Remind, JsonNode will default to the scientific and technical method when acquiring big data types. refer to: #15687

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is mainly to align with Elastic Search JsonConverter tests. Maybe we could improve with Logical types in a follow-up PR for both ?

@eolivelli eolivelli merged commit 8c21c00 into apache:master Jun 3, 2022
@cbornet cbornet deleted the kinesis-jsonconverter branch June 3, 2022 08:57
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants