You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2022/02/03 21:51:18 UTC
[GitHub] [avro] KyleSchoonover opened a new pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
KyleSchoonover opened a new pull request #1515:
URL: https://github.com/apache/avro/pull/1515
### 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-3364
### Tests
- [ ] My PR does not need testing for this extremely good reason: non functional changes
### 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
[GitHub] [avro] zcsizmadia commented on pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
Posted by GitBox <gi...@apache.org>.
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: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] zcsizmadia commented on pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
Posted by GitBox <gi...@apache.org>.
zcsizmadia commented on pull request #1515:
URL: https://github.com/apache/avro/pull/1515#issuecomment-1030094562
Multiple people can work on it at the same time, git will help you ot there. Loosing the git history I mentioned in another thread is another con against this change
--
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
[GitHub] [avro] KyleSchoonover commented on pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
Posted by GitBox <gi...@apache.org>.
KyleSchoonover commented on pull request #1515:
URL: https://github.com/apache/avro/pull/1515#issuecomment-1030090020
Part of my reasoning behind this change is always code maintenance and the ability to have multiple people working at once. I'm a bit indifferent on whether or not we change it, but it is a habit I do. This is just going through my first pass through of the code and getting things cleaned up a bit. I'm ok reverting it, but will probably revisit, because I'm not 100% sure I like the subclasses to begin with.
--
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
[GitHub] [avro] KyleSchoonover commented on pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
Posted by GitBox <gi...@apache.org>.
KyleSchoonover commented on pull request #1515:
URL: https://github.com/apache/avro/pull/1515#issuecomment-1030020381
The important part is
`public partial class GenericDatumReader<T>`
Specifically the keyword partial. There are really 2 reasons to use this. The first is very large classes may need to be broken apart in many files for it to be easier to maintain. The second, which is what I did was to move complete sub classes to their own file. This actually doesn't change how the application compiles, but more for organizational and maintenance reasons.
--
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
[GitHub] [avro] KyleSchoonover closed pull request #1515: AVRO-3364 Breakout subclasses for GenericDatumReader
Posted by GitBox <gi...@apache.org>.
KyleSchoonover closed pull request #1515:
URL: https://github.com/apache/avro/pull/1515
--
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