[prev in list] [next in list] [prev in thread] [next in thread] 

List:       avro-dev
Subject:    [jira] [Work logged] (AVRO-3334) Simplify getNullableType in CodeGen
From:       "ASF GitHub Bot (Jira)" <jira () apache ! org>
Date:       2022-01-31 16:27:00
Message-ID: JIRA.13425692.1643600041000.232889.1643646420287 () Atlassian ! JIRA
[Download RAW message or body]


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

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

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


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

    Worklog Id:     (was: 718057)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
> 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)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic