ccciudatu commented on a change in pull request #13572:
URL: https://github.com/apache/beam/pull/13572#discussion_r546433010
##########
File path:
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoMessageSchema.java
##########
@@ -129,68 +129,29 @@ public SchemaUserTypeCreator schemaTypeCreator(Class<?>
targetClass, Schema sche
"rawtypes", // TODO(https://issues.apache.org/jira/browse/BEAM-10556)
"unchecked"
})
- public static <T> SimpleFunction<byte[], Row> getProtoBytesToRowFn(Class<T>
clazz) {
+ public static <T extends Message> SimpleFunction<byte[], Row>
getProtoBytesToRowFn(
Review comment:
reverted
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/kafka/BeamKafkaProtoTable.java
##########
@@ -95,9 +97,9 @@ private static Schema inferAndVerifySchema(Class<?>
protoClass, Schema messageSc
/** A PTransform to convert {@link Row} to {@code KV<byte[], byte[]>}. */
private static class ProtoRecorderEncoder
extends PTransform<PCollection<Row>, PCollection<KV<byte[], byte[]>>> {
- private final Class<?> clazz;
+ private final Class<? extends Message> clazz;
- public ProtoRecorderEncoder(Class<?> clazz) {
+ public ProtoRecorderEncoder(Class<? extends Message> clazz) {
Review comment:
reverted
##########
File path:
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/kafka/BeamKafkaProtoTable.java
##########
@@ -32,10 +34,10 @@
"nullness" // TODO(https://issues.apache.org/jira/browse/BEAM-10402)
})
public class BeamKafkaProtoTable extends BeamKafkaTable {
- private final Class<?> protoClass;
+ private final Class<? extends Message> protoClass;
public BeamKafkaProtoTable(
- Schema messageSchema, String bootstrapServers, List<String> topics,
Class<?> protoClass) {
+ Schema messageSchema, String bootstrapServers, List<String> topics,
Class<? extends Message> protoClass) {
Review comment:
reverted
----------------------------------------------------------------
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]