[
https://issues.apache.org/jira/browse/BEAM-4454?focusedWorklogId=174250&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-174250
]
ASF GitHub Bot logged work on BEAM-4454:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Dec/18 20:04
Start Date: 11/Dec/18 20:04
Worklog Time Spent: 10m
Work Description: kanterov commented on a change in pull request #7233:
[BEAM-4454] Add remaining functionality for AVRO schemas
URL: https://github.com/apache/beam/pull/7233#discussion_r240578960
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/GetterBasedSchemaProvider.java
##########
@@ -35,6 +36,7 @@
abstract FieldValueGetterFactory fieldValueGetterFactory();
/** Implementing class should override to return a setter factory. */
+ @Nullable
abstract FieldValueSetterFactory fieldValueSetterFactory();
Review comment:
As far as I see in the code, the only usage of `fieldValueSetterFactory` is
`schemaTypeCreatorFactory`. In `AvroSpecificRecordSchema`,
`fieldValueSetterFactory` is overridden to null, and `schemaTypeCreatorFactory`
has own implementation.
As for me, it wasn't easy to follow. What do you think about extracting
anonymous class from `GetterBasedSchemaProvider#schemaTypeCreatorFactory` and
removing `GetterBasedSchemaProvider#fieldValueSetterFactory`, or in other
words, using composition over inheritance, as I feel it doesn't fit as well
anymore.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 174250)
Time Spent: 7h (was: 6h 50m)
> Provide automatic schema registration for AVROs
> -----------------------------------------------
>
> Key: BEAM-4454
> URL: https://issues.apache.org/jira/browse/BEAM-4454
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-core
> Reporter: Reuven Lax
> Assignee: Reuven Lax
> Priority: Major
> Time Spent: 7h
> Remaining Estimate: 0h
>
> Need to make sure this is a compatible change
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)