iemejia commented on a change in pull request #14858:
URL: https://github.com/apache/beam/pull/14858#discussion_r645618000
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
##########
@@ -1277,4 +1308,17 @@ private static void checkTypeName(Schema.TypeName got,
Schema.TypeName expected,
checkArgument(
got.equals(expected), "Can't convert '%s' to %s, expected: %s", label,
got, expected);
}
+
+ /** Helper factory to build JDBC Logical types for AVRO Schema. */
+ private static org.apache.avro.Schema makeJdbcLogicalStringAvroType(
+ Schema.LogicalType<?, ?> logicalType) {
+ JDBCType jdbcType = JDBCType.valueOf(logicalType.getIdentifier());
+ Integer size = logicalType.getArgument();
+
+ String schemaJson =
Review comment:
I hate to be this annoying @anantdamle but since we are trying to
'align' with Hive/Spark maybe it is good that we name the logicalType names to
coincide with the ones in the class you mention which are in lowercase.
https://github.com/apache/hive/blob/135629b8d6b538fed092641537034a9fbc59c7a0/serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java#L59
--
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]