You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/31 03:40:00 UTC

[jira] [Work logged] (AVRO-3334) Simplify getNullableType in CodeGen

     [ https://issues.apache.org/jira/browse/AVRO-3334?focusedWorklogId=717744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-717744 ]

ASF GitHub Bot logged work on AVRO-3334:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Jan/22 03:39
            Start Date: 31/Jan/22 03:39
    Worklog Time Spent: 10m 
      Work Description: 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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 717744)
    Remaining Estimate: 0h
            Time Spent: 10m

> Simplify getNullableType in CodeGen
> -----------------------------------
>
>                 Key: AVRO-3334
>                 URL: https://issues.apache.org/jira/browse/AVRO-3334
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.11.1
>            Reporter: Kyle Schoonover
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> First issue: C# naming for methods uses Pascal casing.  Update getNullableType to GetNullableType.  I do not see a reason to preserve anything from the Java library with this naming style.  Additionally, the java library does not have this method.
> Second issue: This is a publicly exposed method it has no specific error handling on the input (UnionSchema schema).  It should be evaluated for null and throw an ArgumentNullException, if null, before being used.
> Third issue: We should evaluate the null return scenarios first. 
> The first validation is that the schema has 2 elements.
> The second evaluation is to determine if all of the elements (Schema.Tag) is not of type null.
> If these evaluations are not met the existing logic will return the schema where the Schema.Tag is not Schema.Type.Null



--
This message was sent by Atlassian Jira
(v8.20.1#820001)