Skip to content
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][schema] Apply Schema for GenericJsonRecord if present #20104

Closed
wants to merge 1 commit into from

Conversation

tisonkun
Copy link
Member

This closes #20092.

Motivation

See #20092

Modifications

Add jackson-dataformat-avro and convert JSONNode with AvroSchema if configured

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

Signed-off-by: tison <wander4096@gmail.com>
Copy link
Contributor

@aymkhalil aymkhalil left a comment

Choose a reason for hiding this comment

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

This patch makes sense and solves the original problem - it only needs unit tests.

super(schemaVersion, fields);
this.jn = jn;
if (schemaInfo == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should just mark schemaInfo @nonnull - it seems GenericJsonRecord is only meant to be used with Schema (otherwise, we open the door for schema/java type mismatch).

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label May 15, 2023
@Technoboy- Technoboy- added this to the 3.2.0 milestone Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@tisonkun
Copy link
Member Author

No longer work on this.

The schema functionality doesn't have a good shape to work on. This PR is no more than another monkey patch.

@tisonkun tisonkun closed this Feb 26, 2024
@tisonkun tisonkun deleted the issue-20092 branch February 26, 2024 11:29
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 Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Pulsar client AUTO_CONSUME "double" as "BigDecimal" in JSON schemas
3 participants