damccorm commented on code in PR #34024:
URL: https://github.com/apache/beam/pull/34024#discussion_r1963954153


##########
buildSrc/build.gradle.kts:
##########
@@ -45,7 +45,7 @@ dependencies {
   implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.14")
 
   runtimeOnly("com.google.protobuf:protobuf-gradle-plugin:0.8.13")             
                            // Enable proto code generation
-  runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.9.1")   
                            // Enable Avro code generation
+  runtimeOnly("com.github.davidmc24.gradle.plugin:gradle-avro-plugin:1.1.0")   
                            // Enable Avro code generation. Version 1.1.0 is 
the last supporting avro 1.10.2

Review Comment:
   I'm not sure about downgrading this dependency. Why do we specifically need 
to target 1.1.0? It is a rather old dependency, and downgrading could introduce 
other problems



##########
sdks/java/extensions/avro/src/test/avro/org/apache/beam/sdk/extensions/avro/schemas/logicaltypes/logical-types.avsc:
##########
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */

Review Comment:
   we don't need to include a license header here since we're not distributing 
this file (and it is under the RAT exclusion)



##########
sdks/java/extensions/avro/src/main/java/org/apache/beam/sdk/extensions/avro/schemas/utils/AvroUtils.java:
##########
@@ -154,6 +158,15 @@ public class AvroUtils {
       new ForLoadedType(ReadableInstant.class);
   private static final ForLoadedType JODA_INSTANT = new 
ForLoadedType(Instant.class);
 
+  private static final GenericData GENERIC_DATA_WITH_DEFAULT_CONVERSIONS;
+
+  static {
+    GENERIC_DATA_WITH_DEFAULT_CONVERSIONS = new GenericData();
+    addLogicalTypeConversions(GENERIC_DATA_WITH_DEFAULT_CONVERSIONS);
+    GENERIC_DATA_WITH_DEFAULT_CONVERSIONS.addLogicalTypeConversion(
+        new Conversions.DecimalConversion());

Review Comment:
   Is there a reason not to just add this to `addLogicalTypeConversion`



-- 
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]

Reply via email to