[ https://issues.apache.org/jira/browse/AVRO-3459?focusedWorklogId=745364&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745364 ]
ASF GitHub Bot logged work on AVRO-3459: ---------------------------------------- Author: ASF GitHub Bot Created on: 21/Mar/22 18:50 Start Date: 21/Mar/22 18:50 Worklog Time Spent: 10m Work Description: zcsizmadia commented on pull request #1607: URL: https://github.com/apache/avro/pull/1607#issuecomment-1074285479 Hmmmm. I am confused. My avrogen installed from nuget.org generates this: ``` // ------------------------------------------------------------------------------ // <auto-generated> // Generated by avrogen, version 1.11.0.0 // Changes to this file may cause incorrect behavior and will be lost if code // is regenerated // </auto-generated> // ------------------------------------------------------------------------------ namespace org.apache.avro.codegentest.other { using System; using System.Collections.Generic; using System.Text; using Avro; using Avro.Specific; public partial class NestedOtherNamespaceRecord : ISpecificRecord { public static Schema _SCHEMA = Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"NestedOtherNamespaceRecord\",\"namespace\":\"org.apache.avro" + ".codegentest.other\",\"fields\":[{\"name\":\"someField\",\"type\":\"int\"}]}"); private int _someField; public virtual Schema Schema { get { return NestedOtherNamespaceRecord._SCHEMA; } } public int someField { get { return this._someField; } set { this._someField = value; } } public virtual object Get(int fieldPos) { switch (fieldPos) { case 0: return this.someField; default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()"); }; } public virtual void Put(int fieldPos, object fieldValue) { switch (fieldPos) { case 0: this.someField = (System.Int32)fieldValue; break; default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()"); }; } } } ``` -- 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-unsubscr...@avro.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 745364) Time Spent: 1h 50m (was: 1h 40m) > Use simple types and nullable modifier > -------------------------------------- > > Key: AVRO-3459 > URL: https://issues.apache.org/jira/browse/AVRO-3459 > Project: Apache Avro > Issue Type: Improvement > Components: csharp > Reporter: Kyle Schoonover > Priority: Minor > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > First, it is more common to use the simple types keyword instead of the > struct type. ie: int instead of System.Int32 > Second, instead of using the struct Nullable<int> you can use int? -- This message was sent by Atlassian Jira (v8.20.1#820001)