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 2022/01/31 03:39:04 UTC

[GitHub] [avro] KyleSchoonover opened a new pull request #1484: AVRO-3334 Updated GetNullableType to simplify execution

KyleSchoonover opened a new pull request #1484:
URL: https://github.com/apache/avro/pull/1484


   ### Jira
   
   - [ ] 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-3334
   
   ### Tests
   
   - [ ] My PR adds the following unit tests: Validates exception thrown when a null schema object is provided.  The rest of the method is tested in the TestEmbeddedGenerics test.
   
   ### Commits
   
   - [ ] 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
   
   - [ ] 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.

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 merged pull request #1484: AVRO-3334 Updated GetNullableType to simplify execution

Posted by GitBox <gi...@apache.org>.
martin-g merged pull request #1484:
URL: https://github.com/apache/avro/pull/1484


   


-- 
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 #1484: AVRO-3334 Updated GetNullableType to simplify execution

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



##########
File path: lang/csharp/src/apache/main/CodeGen/CodeGen.cs
##########
@@ -989,29 +990,34 @@ internal static string getType(Schema schema, bool nullible, ref bool nullibleEn
         /// <returns>
         /// schema that is nullable.
         /// </returns>
+        /// <exception cref="System.ArgumentNullException">schema - UnionSchema can not be null.</exception>
+        [Obsolete("Use GetNullableType. This method will be deprecated in a future release.")]

Review comment:
       Am I wrong or `[Obsolete]` in C# is the same as `@Deprecated` in Java ?
   I.e. by adding `[Obsolete]` the following statement is already deprecated?
   If I am correct then the message should say `This method is deprecated and it will be removed in a future release.`




-- 
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] KyleSchoonover commented on a change in pull request #1484: AVRO-3334 Updated GetNullableType to simplify execution

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



##########
File path: lang/csharp/src/apache/main/CodeGen/CodeGen.cs
##########
@@ -989,29 +990,20 @@ internal static string getType(Schema schema, bool nullible, ref bool nullibleEn
         /// <returns>
         /// schema that is nullable.
         /// </returns>
-        public static Schema getNullableType(UnionSchema schema)

Review comment:
       Updated, will use this pattern in the future.




-- 
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 #1484: AVRO-3334 Updated GetNullableType to simplify execution

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



##########
File path: lang/csharp/src/apache/main/CodeGen/CodeGen.cs
##########
@@ -989,29 +990,20 @@ internal static string getType(Schema schema, bool nullible, ref bool nullibleEn
         /// <returns>
         /// schema that is nullable.
         /// </returns>
-        public static Schema getNullableType(UnionSchema schema)

Review comment:
       Since this is a public method we need to deprecate the old method for some time/releases.
   The old method should delegate to the new one. 




-- 
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 pull request #1484: AVRO-3334 Updated GetNullableType to simplify execution

Posted by GitBox <gi...@apache.org>.
martin-g commented on pull request #1484:
URL: https://github.com/apache/avro/pull/1484#issuecomment-1026745890


   Thank you, @KyleSchoonover !


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