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

AVRO-1463 [Perl] Quietly validate undefined values #2975

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

jjatria
Copy link
Contributor

@jjatria jjatria commented Jun 24, 2024

What is the purpose of the change

The code to validate data against a schema made some assumptions about the state of the data before validating, which resulted in some spurious warnings being raised when validating undefined values for some data types. This change, based on one submitted by John Karp back in 2014 for https://issues.apache.org/jira/browse/AVRO-1463, resolves this issue and expands the test suite to test the validation of undefined values for all primitive data types.

Verifying this change

This change extends t/01_schema.t to include a test for validating undefined values for all primitive types.

Note that these tests do not fail when warnings are raised, but simply exercise the code that used to issue warnings we want to avoid. Making the code fail on warnings, particularly as a global condition, risks making the test suite brittle, since we don't control what may raise warnings in the future. This makes it more likely we'll spot them.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@github-actions github-actions bot added the Perl label Jun 24, 2024
@jjatria jjatria force-pushed the avro-1463-silent-null-warnings branch from 16856ad to 41b3fa2 Compare June 25, 2024 09:03
@jjatria
Copy link
Contributor Author

jjatria commented Jun 25, 2024

Fixed the conflict with the change log by rebasing on top of main.

@martin-g martin-g merged commit 6956954 into apache:main Jun 25, 2024
6 checks passed
@martin-g
Copy link
Member

Thank you, @jjatria !

@jjatria jjatria deleted the avro-1463-silent-null-warnings branch June 25, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants