You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2020/12/01 08:11:25 UTC

[GitHub] [avro] opwvhk opened a new pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

opwvhk opened a new pull request #985:
URL: https://github.com/apache/avro/pull/985


   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [X] My PR addresses the following [Avro Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
     - https://issues.apache.org/jira/browse/AVRO-2976
     - ~~In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).~~
       (no dependencies have changed)
   
   ### Tests
   
   - [X] My PR adds the following unit tests ~~__OR__ does not need testing for this extremely good reason~~:
       `org.apache.avro.compiler.idl.TestLogicalTypes`
   
   ### Commits
   
   - [X] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [X] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain Javadoc that explain what it does
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r766881775



##########
File path: lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestLogicalTypes.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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
+ *
+ *     https://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.
+ */
+package org.apache.avro.compiler.idl;
+
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Protocol;
+import org.apache.avro.Schema;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestLogicalTypes {
+  private static final Logger LOG = LoggerFactory.getLogger(TestLogicalTypes.class);
+
+  private Schema logicalTypeFields;
+
+  @Before
+  public void setup() throws ParseException {
+    final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    Idl idl = new Idl(cl.getResourceAsStream("logicalTypes.avdl"), "UTF-8");
+    Protocol protocol = idl.CompilationUnit();
+    String json = protocol.toString();
+    LOG.info(json);

Review comment:
       Yes. I used it to check if the test was valid. I'll remove it; it has no function anymore.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r763820457



##########
File path: lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
##########
@@ -1617,7 +1622,14 @@ private JsonNode Json() :
 { String s; Token t; JsonNode n; }
 { 
 ( s = JsonString() { n = new TextNode(s); }
-| (t=<INTEGER_LITERAL> { n = new LongNode(Long.parseLong(t.image)); })
+| (t=<INTEGER_LITERAL> {
+  long longValue = Long.parseLong(t.image);
+  int intValue = (int)longValue;
+  if (intValue == longValue)
+    n = new IntNode(intValue);
+  else
+    n = new LongNode(longValue);
+})

Review comment:
       This bit here creates a JSON node with an Integer in it instead of a Long if the number is small enough.
   This is needed because the logical type `decimal` will fail to validate if the scale or precision are Long values (even if small enough).




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk removed a comment on pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk removed a comment on pull request #985:
URL: https://github.com/apache/avro/pull/985#issuecomment-733927191


   Also, the build seems to execute multiple times. The first two reactor summaries report all success, only the third one fails.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] RyanSkraba merged pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
RyanSkraba merged pull request #985:
URL: https://github.com/apache/avro/pull/985


   


-- 
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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r724056237



##########
File path: lang/java/pom.xml
##########
@@ -317,16 +317,18 @@
             <removeUnusedImports/>
           </java>
         </configuration>
+        <!--

Review comment:
       This was temporary and should be reverted, I guess.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r733513111



##########
File path: lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
##########
@@ -1296,20 +1300,11 @@ private void SchemaProperty(Map<String, JsonNode> properties):
 void FieldDeclaration(List<Field> fields):
 {
   Schema type;
-  Map<String, JsonNode> props = new LinkedHashMap<String, JsonNode>();
 }
 {
-  // TODO should we be able to specify properties on any Type?
-  // or just on field declarations as done here
-
-  ( SchemaProperty(props) )*
   type = Type()
   VariableDeclarator(type, fields) ( "," VariableDeclarator(type, fields) )*
   ";"
-  {
-    for (String key : props.keySet())
-      Accessor.addProp(type, key, props.get(key));

Review comment:
       The code here applied schema properties on the type. Which the Type() declaration does as well.
   It was basically doing the same thing twice.

##########
File path: lang/java/compiler/src/test/idl/input/simple.avdl
##########
@@ -60,6 +60,7 @@ protocol Simple {
     time_ms t = 0;
 
     @foo.bar("bar.foo") long l = 0;
+    @foo.bar.bar("foo.bar2") array<string> a = [];

Review comment:
       The code here applied schema properties on the type. Which the `Type()` declaration does as well.
   It was basically doing the same thing twice.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r763823105



##########
File path: lang/java/compiler/src/test/idl/logicalTypes.avdl
##########
@@ -0,0 +1,32 @@
+/*
+ * 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
+ *
+ *     https://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.
+ */
+@version("1.0.5")
+@namespace("org.apache.avro.test")
+protocol LogicalTypeTest {
+    record LogicalTypeFields {
+        date aDate;
+        time_ms aTime;
+        timestamp_ms aTimestamp;
+        local_timestamp_ms aLocalTimestamp;
+        decimal(6,2) pocketMoney;
+        uuid identifier;
+        @logicalType("timestamp-micros") long anotherTimestamp;
+        @logicalType("decimal") @precision(6) @scale(2) bytes allowance;
+        @logicalType("decimal") @precision(3000000000) @scale(0) bytes byteArray;

Review comment:
       These three demonstrate non-builtin logical types.
   Or  to be exact, the first two do. The last field schema has the properties, but not a logical type, because `3000000000` does not fit into an `int`.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk closed pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk closed pull request #985:
URL: https://github.com/apache/avro/pull/985


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r726121601



##########
File path: lang/java/pom.xml
##########
@@ -317,16 +317,18 @@
             <removeUnusedImports/>
           </java>
         </configuration>
+        <!--

Review comment:
       That's the thing: the build failed, but I didn't see an error message.
   When I built on a terminal (from the java root) the build succeeded, and succeeded later via IntelliJ as well.
   
   For now, I'm assuming it was a fluke on my end.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] RyanSkraba merged pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
RyanSkraba merged pull request #985:
URL: https://github.com/apache/avro/pull/985


   


-- 
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: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on pull request #985:
URL: https://github.com/apache/avro/pull/985#issuecomment-733927191


   Also, the build seems to execute multiple times. The first two reactor summaries report all success, only the third one fails.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on pull request #985:
URL: https://github.com/apache/avro/pull/985#issuecomment-733926948


   The build continues to fail on something unrelated to this change.
   
   The error:
   ``` Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory```
   Links:
   https://travis-ci.com/github/apache/avro/jobs/448122371#L12903
   https://travis-ci.com/github/apache/avro/jobs/448122372#L13161
   
   Does anyone know what the cause is?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r763818860



##########
File path: lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
##########
@@ -1058,6 +1059,9 @@ private Schema NamedSchemaDeclaration(Map<String, JsonNode> props):
      } else {                                     // add all other props
        Accessor.addProp(s, key, props.get(key));
      }
+   LogicalType logicalType = LogicalTypes.fromSchemaIgnoreInvalid(s);
+   if (logicalType != null)
+     logicalType.addToSchema(s);

Review comment:
       Every time we apply properties to a schema, we should call this logic.
   It determines the logical type of the schema, and applies it if possible.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk edited a comment on pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk edited a comment on pull request #985:
URL: https://github.com/apache/avro/pull/985#issuecomment-733926948


   ~The build continues to fail on something unrelated to this change.~
   
   ~The error:~
   ~``` Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory```~
   ~Links:~
   ~https://travis-ci.com/github/apache/avro/jobs/448122371#L12903~
   ~https://travis-ci.com/github/apache/avro/jobs/448122372#L13161~
   
   ~Does anyone know what the cause is?~
   
   (edit: no longer applies due to switch to GitHub Actions)


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r733491999



##########
File path: lang/java/compiler/src/test/idl/input/simple.avdl
##########
@@ -60,6 +60,7 @@ protocol Simple {
     time_ms t = 0;
 
     @foo.bar("bar.foo") long l = 0;
+    @foo.bar.bar("foo.bar2") array<string> a = [];

Review comment:
       The code here applied schema properties on the type. Which the `Type()` declaration does as well.
   It was basically doing the same thing twice.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r733096593



##########
File path: lang/java/compiler/src/test/idl/input/simple.avdl
##########
@@ -60,6 +60,7 @@ protocol Simple {
     time_ms t = 0;
 
     @foo.bar("bar.foo") long l = 0;
+    @foo.bar.bar("foo.bar2") array<string> a = [];

Review comment:
       Is this related to the issue with the logical types ?

##########
File path: lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestLogicalTypes.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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
+ *
+ *     https://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.
+ */
+package org.apache.avro.compiler.idl;
+
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Protocol;
+import org.apache.avro.Schema;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestLogicalTypes {
+  private static final Logger LOG = LoggerFactory.getLogger(TestCycle.class);

Review comment:
       Why `TestCycle.class` ?

##########
File path: lang/java/compiler/src/main/javacc/org/apache/avro/compiler/idl/idl.jj
##########
@@ -1296,20 +1300,11 @@ private void SchemaProperty(Map<String, JsonNode> properties):
 void FieldDeclaration(List<Field> fields):
 {
   Schema type;
-  Map<String, JsonNode> props = new LinkedHashMap<String, JsonNode>();
 }
 {
-  // TODO should we be able to specify properties on any Type?
-  // or just on field declarations as done here
-
-  ( SchemaProperty(props) )*
   type = Type()
   VariableDeclarator(type, fields) ( "," VariableDeclarator(type, fields) )*
   ";"
-  {
-    for (String key : props.keySet())
-      Accessor.addProp(type, key, props.get(key));

Review comment:
       It is not clear to me why this code is being removed.
   I am not familiar with idl.jj.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r725671922



##########
File path: lang/java/pom.xml
##########
@@ -317,16 +317,18 @@
             <removeUnusedImports/>
           </java>
         </configuration>
+        <!--

Review comment:
       Yes. But after reverting the change, spotless fails. But running `man spotless:apply` changes *all* files, even the ones I did not touch...
   
   Another run however, succeeded. I don't know why.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r766111638



##########
File path: lang/java/compiler/src/test/java/org/apache/avro/compiler/idl/TestLogicalTypes.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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
+ *
+ *     https://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.
+ */
+package org.apache.avro.compiler.idl;
+
+import org.apache.avro.LogicalType;
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Protocol;
+import org.apache.avro.Schema;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestLogicalTypes {
+  private static final Logger LOG = LoggerFactory.getLogger(TestLogicalTypes.class);
+
+  private Schema logicalTypeFields;
+
+  @Before
+  public void setup() throws ParseException {
+    final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+    Idl idl = new Idl(cl.getResourceAsStream("logicalTypes.avdl"), "UTF-8");
+    Protocol protocol = idl.CompilationUnit();
+    String json = protocol.toString();
+    LOG.info(json);

Review comment:
       debug ?!




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r733491999



##########
File path: lang/java/compiler/src/test/idl/input/simple.avdl
##########
@@ -60,6 +60,7 @@ protocol Simple {
     time_ms t = 0;
 
     @foo.bar("bar.foo") long l = 0;
+    @foo.bar.bar("foo.bar2") array<string> a = [];

Review comment:
       The code here applies schema properties on the type. Which the `Type()` declaration does as well.
   It was basically doing the same thing twice.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r733489544



##########
File path: lang/java/compiler/src/test/idl/input/simple.avdl
##########
@@ -60,6 +60,7 @@ protocol Simple {
     time_ms t = 0;
 
     @foo.bar("bar.foo") long l = 0;
+    @foo.bar.bar("foo.bar2") array<string> a = [];

Review comment:
       No, it increases test coverage. And as I'm touching the tests of this part of the code anyway, I thought I'd apply the boyscout rule.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r724056237



##########
File path: lang/java/pom.xml
##########
@@ -317,16 +317,18 @@
             <removeUnusedImports/>
           </java>
         </configuration>
+        <!--

Review comment:
       This was temporary and should be reverted, I guess.




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] martin-g commented on a change in pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
martin-g commented on a change in pull request #985:
URL: https://github.com/apache/avro/pull/985#discussion_r725681622



##########
File path: lang/java/pom.xml
##########
@@ -317,16 +317,18 @@
             <removeUnusedImports/>
           </java>
         </configuration>
+        <!--

Review comment:
       > But after reverting the change, spotless fails.
   
   Fails how ? Please paste the error!




-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [avro] opwvhk closed pull request #985: AVRO-2976: Add LogicalType parsing to the IDL

Posted by GitBox <gi...@apache.org>.
opwvhk closed pull request #985:
URL: https://github.com/apache/avro/pull/985


   


----------------------------------------------------------------
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:
users@infra.apache.org