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

ASF subversion and git services commented on AVRO-3334:
-------------------------------------------------------

Commit 101e30305eecdd97a21dff14a6a9de5cda6d617e in avro's branch 
refs/heads/branch-1.11 from Kyle Schoonover
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=101e303 ]

AVRO-3334 Updated GetNullableType to simplify execution (#1484)

* AVRO-3334 Updated GetNullableType to simplify execution

* Updated documentation

* Updated to include obsolete method

Co-authored-by: Kyle T. Schoonover <[email protected]>
Co-authored-by: Martin Grigorov <[email protected]>
(cherry picked from commit 93db8e005eaaa07b5003dcbd03bee49dea3975b3)


> 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
>              Labels: pull-request-available
>          Time Spent: 50m
>  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)

Reply via email to