Abacn commented on code in PR #33422:
URL: https://github.com/apache/beam/pull/33422#discussion_r1924371790
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/AvroGenericRecordToStorageApiProto.java:
##########
@@ -69,11 +71,15 @@ public class AvroGenericRecordToStorageApiProto {
// A map of supported logical types to the protobuf field type.
static final Map<String, TableFieldSchema.Type> LOGICAL_TYPES =
ImmutableMap.<String, TableFieldSchema.Type>builder()
- .put(LogicalTypes.date().getName(), TableFieldSchema.Type.DATE)
- .put(LogicalTypes.decimal(1).getName(),
TableFieldSchema.Type.BIGNUMERIC)
- .put(LogicalTypes.timestampMicros().getName(),
TableFieldSchema.Type.TIMESTAMP)
- .put(LogicalTypes.timestampMillis().getName(),
TableFieldSchema.Type.TIMESTAMP)
- .put(LogicalTypes.uuid().getName(), TableFieldSchema.Type.STRING)
+ .put("date", TableFieldSchema.Type.DATE)
Review Comment:
both are fine, if choose to go with resolved names, good to add a comment
these come from corresponding avro LogicalTypes implementations' getName()
--
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]