-
Notifications
You must be signed in to change notification settings - Fork 70
feat: add avro input&output stream based on arrow stream impl #105
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
Conversation
wgtmac
left a 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.
Generally LGTM. Thanks!
src/iceberg/avro/avro_stream.cc
Outdated
| #include <format> | ||
|
|
||
| #include <arrow/result.h> | ||
| #include <iceberg/exception.h> |
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.
| #include <iceberg/exception.h> | |
| #include "iceberg/exception.h" |
For iceberg headers, it's better to use double quote style since it's in the current working directory.
wgtmac
left a 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.
LGTM. Thanks!
zhjwpku
left a 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.
LGTM
|
|
||
| /// \brief "Returns" back some of the data to the stream. The returned data must be less | ||
| /// than what was obtained in the last call to next(). | ||
| void backup(size_t len) override; |
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.
Could you elaborate why we need a backup method when reading Avro? Does not make a lot of sense to me.
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 is a public interface from avro-cpp. IIRC, it internally reads a large chunk into the buffer and then backup some if read too much to reduce I/O.
Fokko
left a 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.
LGTM @dongxiao1198, thanks for the reviews @yingcai-cy, @zhjwpku and @wgtmac
support basic avro stream based on arrow implement