-
Notifications
You must be signed in to change notification settings - Fork 217
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
TANGO 2130 #1903
TANGO 2130 #1903
Conversation
adamallegro
commented
Sep 24, 2024
- TANGO-2130 : Tests for primitive types
- TANGO-2130 : Array and Map primitives - tests
- TANGO-2130 : Checkpoint after primitives
- TANGO-2130 : Unit tests for records and for simple type mappings
- TANGO-2130 : Updated and refactored tests
if (value instanceof Boolean) { | ||
return value; | ||
} else if (value instanceof Number) { | ||
return ((Number) value).intValue() > 0; |
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.
Is it really how the int field should be casted to boolean? I would have used ((Number) value).intValue() != 0
return new Schema.Parser().parse(AvroTrait.class.getClassLoader().getResourceAsStream("schemas/${fileName}.avsc")) | ||
} | ||
|
||
GenericRecord getGenericRecordFromFile(String payloadFile, Schema schema) { |
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 don't think you use this method in the code here as it's intended to read .avro files without headers.
|
||
where: | ||
suite | avroType | protoDescriptor | avroValue | expectedProtoValue | transformResult | ||
"primitives" | "string" | StringProto.PrimitivesString.getDescriptor() | "value" | "value" | { c -> c } |
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.
Why do you need transformResult
variable if all provided values are the same (identity func)?