huan233usc commented on code in PR #800:
URL: https://github.com/apache/iceberg-cpp/pull/800#discussion_r3678269503


##########
src/iceberg/avro/avro_data_util_internal.h:
##########
@@ -19,14 +19,48 @@
 
 #pragma once
 
+#include <memory>
+
 #include <arrow/array/builder_base.h>
+#include <arrow/scalar.h>
 #include <avro/GenericDatum.hh>
 
 #include "iceberg/arrow/metadata_column_util_internal.h"
+#include "iceberg/expression/literal.h"
 #include "iceberg/schema_util.h"
 
 namespace iceberg::avro {
 
+/// \brief Cached Arrow scalar for a `kDefault` field projection.
+///
+/// Materialized once (see `PrepareDefaultScalars`) so row-by-row Avro decode 
only
+/// needs `AppendScalar` instead of repeating `ToArrowScalar` / `CastTo` per 
row.
+struct AvroDefaultAttributes : FieldProjection::ExtraAttributes {

Review Comment:
   Done — renamed to `AvroExtraAttributes` with a `default_scalar` member, 
mirroring `ParquetExtraAttributes`. Since Avro now has a single attributes 
container, the append path uses `checked_cast` instead of a per-row 
`dynamic_cast`, and future Avro attributes can be added to the same struct 
rather than as competing subclasses.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to