-
Notifications
You must be signed in to change notification settings - Fork 38
feat: add support for avro to arrow data conversion #124
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,21 @@ | |
|
||
namespace iceberg::avro { | ||
|
||
/// \brief Append an Avro datum to an Arrow array builder. | ||
/// | ||
/// This function handles schema evolution by using the provided projection to map | ||
/// fields from the Avro data to the expected Arrow schema. | ||
/// | ||
/// \param avro_node The Avro schema node (must be a record at root level) | ||
/// \param avro_datum The Avro data to append | ||
/// \param projection Schema projection from `projected_schema` to `avro_node` | ||
/// \param projected_schema The projected schema | ||
/// \param array_builder The Arrow array builder to append to (must be a struct builder) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it's a undefined behavior to pass-in a different type builder? Can the argument here just a StructBuilder? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That requires additional cast before using this function. |
||
/// \return Status indicating success or failure | ||
Status AppendDatumToBuilder(const ::avro::NodePtr& avro_node, | ||
const ::avro::GenericDatum& avro_datum, | ||
const SchemaProjection& projection, | ||
const Schema& arrow_schema, | ||
const Schema& projected_schema, | ||
::arrow::ArrayBuilder* array_builder); | ||
|
||
} // namespace iceberg::avro |
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.
Nice!