Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: add Avro Schema input processor #1753
feat: add Avro Schema input processor #1753
Changes from 8 commits
be40416
4c4af48
a36cafe
cd8edf9
34d707c
c508005
73f47d7
3b924d4
277ff53
fc2ab8e
3db2eb2
017d635
ba51c45
bdb1dd5
3f35f10
e41e4d6
0f78593
e5249ce
7d927ab
ef792c6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I got my mistake 😅 didn't think of that
i guess need to make a check in every function for the
AvroSchema
object type to consider the value oftype
as an Avro Schema itself.@jonaslagoni, Please correct me If I am heading heading wrong or if there is any alternative. 🙇🏻
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.
This one is a bit hard, because we have two inputs that have a
type
keyword. JSON Schema and Avro, each with overlapping types such asstring
andboolean
.So the answer to the question lies within "what is the difference between Avro and JSON Schema and how can you easily detect it" 😄
I don't have the perfect answer here unfortunately, other then look at the keywords that are different between them and match with those 🙂
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.
@jonaslagoni How about introducing a check explicitly in the
shouldProcess()
function using an additionalschema
property with a value ofAvro
to differentiate an Avro Schema before processing the input?have you checked these comments: #1753 (comment) and #1753 (comment)
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.
Can you give an example of what you mean?
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.
Example:
@jonaslagoni here, we can add a check for the
schema
property against the valueavro
. This would be to verify that only avro schema is passed to the Avro processor.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.
That would never happen no, because
schema
is not part of the Avro standard and never will be probably 🙂It's okay if the solution is not bullet proof, as long as we document the edge cases.