Skip to content

Conversation

@dongxiao1198
Copy link
Contributor

support basic avro stream based on arrow implement

Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM. Thanks!

#include <format>

#include <arrow/result.h>
#include <iceberg/exception.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#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.

Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Collaborator

@zhjwpku zhjwpku left a 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;
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

@Fokko Fokko left a 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

@Fokko Fokko merged commit cb44bdc into apache:main May 21, 2025
6 checks passed
@dongxiao1198 dongxiao1198 deleted the support_avro_stream branch May 22, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants