Extend avro reader to support more primitive types#16280
Extend avro reader to support more primitive types#16280beinan merged 1 commit intoprestodb:masterfrom
Conversation
beinan
left a comment
There was a problem hiding this comment.
Thank you for this contribution! Looks good to me except a couple clarification questions. Could you also update the release note section in this PR? Thanks!
There was a problem hiding this comment.
Just wanna confirm, could the value be an Integer or something else here?
There was a problem hiding this comment.
yes, the value could be Integer, which will fall into
type.writeLong(blockBuilder, ((Number) value).longValue());
I'm not an expert on this, but my test indicate this line it is compatible with Integer
There was a problem hiding this comment.
do you have any context about why we get rid of Utf8 here? or is there any test covered the VARCHAR type to make sure we're not breaking anything?
There was a problem hiding this comment.
Utf8 implements CharSequence so it should be more compatible in situations where the Avro schema used a different class for string types.
There was a problem hiding this comment.
I see, thank you for the explanation!
cherry-pick of trinodb/trino@bf91d13 Co-Authored-By: Elon Azoulay <elon.azoulay@gmail.com>
updated |
cherry-pick of trinodb/trino@bf91d13
Co-Authored-By: Elon Azoulay elon.azoulay@gmail.com
Test plan - (Please fill in how you tested your changes)
Please make sure your submission complies with our Development, Formatting, and Commit Message guidelines. Don't forget to follow our attribution guidelines for any code copied from other projects.
Fill in the release notes towards the bottom of the PR description.
See Release Notes Guidelines for details.