[
https://issues.apache.org/jira/browse/AVRO-3364?focusedWorklogId=720897&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-720897
]
ASF GitHub Bot logged work on AVRO-3364:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/22 14:21
Start Date: 04/Feb/22 14:21
Worklog Time Spent: 10m
Work Description: zcsizmadia commented on pull request #1515:
URL: https://github.com/apache/avro/pull/1515#issuecomment-1030032462
There is no API break with this change, afaict, I did not compare every
piece of the classes which were moved into a new file, since the change is not
really diffable, however it looks ok froma syntax point of view.
@KyleSchoonover I did read the ticket and it says this is for making the
original file smaller. Could you give some more detail on this change? Are you
planning to introduce some future feature, which requires this?
Here is my 2 cents on using partial classes:
I use it a lot, especially (I might say only) for generated classes. E.g. I
extencd avrogen generated files with functionality. Since avrogen creates a
partial class, I can add my own functionality easily by wruting my addition in
a different partial class, with the same name.
I see the subclasses in the class, which you created the partial class files
for. IMO having those sub/helper classes is not a practice I follow, since it
makes the code harder to read, but even the dotnet runtime source code has many
cases of subclasses. However if the sub classes are getting bigger in size, it
makes sense to put them in their own partial class file. This one particular
file and the sub classes inside of it did not reach my personal threshold of
being unmaintable or unreadable (yet), but of course that is definiteley a
personal preference or opinion.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 720897)
Time Spent: 0.5h (was: 20m)
> Breakout subclasses from GenericDatumReader
> -------------------------------------------
>
> Key: AVRO-3364
> URL: https://issues.apache.org/jira/browse/AVRO-3364
> Project: Apache Avro
> Issue Type: Improvement
> Components: csharp
> Affects Versions: 1.11.1
> Reporter: Kyle Schoonover
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Convert GenericDatumReader to a partial class. Move the subclasses to their
> own files.
> This is for 2 reason. Reduce the size of the GenericDatumReader class file,
> as well as enable easier maintenance as multiple developers work on the
> solution.
> Microsoft Reference on why to do this: [Partial Classes and Methods - C#
> Programming Guide | Microsoft
> Docs|https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)