lostluck commented on a change in pull request #13366:
URL: https://github.com/apache/beam/pull/13366#discussion_r526284530
##########
File path: sdks/go/pkg/beam/core/runtime/graphx/schema/schema.go
##########
@@ -412,12 +382,18 @@ func fieldTypeToReflectType(sft *pipepb.FieldType, opts
[]*pipepb.Option) (refle
// case *pipepb.FieldType_IterableType:
// TODO(BEAM-9615): handle IterableTypes.
- //case *pipepb.FieldType_LogicalType:
- // TODO(BEAM-9615): handle LogicalTypes types.
- //sft.GetLogicalType().
+ case *pipepb.FieldType_LogicalType:
+ lst := sft.GetLogicalType()
+ identifier := lst.GetUrn()
+ lt, ok := logicalTypes[identifier]
+ if !ok {
+ return nil, errors.Errorf("unknown logical type: %v",
identifier)
+ }
+ t = lt.GoType()
// Logical Types are for things that have more specialized user
representation already, or
- // things like Time or protocol buffers.
+ // things like Time or protocol buffers, or int.
+ // Or specifically formatted integers.
Review comment:
The whole block is not necessary now that there's an entire file for the
types. removed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]