badalprasadsingh commented on code in PR #524:
URL: https://github.com/apache/iceberg-go/pull/524#discussion_r2330637229
##########
exprs.go:
##########
@@ -482,8 +482,33 @@ func (b *boundRef[T]) Equals(other BoundTerm) bool {
}
func (b *boundRef[T]) Ref() BoundReference { return b }
-func (b *boundRef[T]) Field() NestedField { return b.field }
-func (b *boundRef[T]) Type() Type { return b.field.Type }
+
+func unwrapLogicalTypeValue(v any) any {
+ if m, ok := v.(map[string]any); ok {
+ if val, exists := m["long.timestamp-micros"]; exists {
+ if microseconds, ok := val.(int64); ok {
+ return Timestamp(microseconds)
+ }
+ }
+
+ if val, exists := m["int.date"]; exists {
+ if days, ok := val.(int32); ok {
+ return days
+ }
+ }
+
+ if val, exists := m["long.time-micros"]; exists {
+ if microseconds, ok := val.(int64); ok {
+ return Time(microseconds)
+ }
+ }
+ }
+
+ return v
Review Comment:
Well, `addEntry` is the function responsible for `encoding` into avro. We
are converting into `avroPartitionData` at that point now.
--
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]