[
https://issues.apache.org/jira/browse/BEAM-9041?focusedWorklogId=367556&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-367556
]
ASF GitHub Bot logged work on BEAM-9041:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Jan/20 16:39
Start Date: 07/Jan/20 16:39
Worklog Time Spent: 10m
Work Description: iemejia commented on issue #10492: [BEAM-9041,
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492#issuecomment-571668281
After thinking more on the issue probably we don't have a nice solution for
it. We cannot define `equals` (and `hashCode`) on `SerializableFunction` or its
parent `ProcessFunction` because Java does not allow to override a member of
java.lang.Object.
So the alternative would be to change the signature of SchemaCoder to use a
new class that implements SerialiableFunction and equals, but this will require
many changes for few returns, maybe the easiest thing to do here is the right
one, just to document that the functions to convert from/to rows in SchemaCoder
must implement equals/hashCode.
WDYT? I will update the PR with the fix for the Avro case in the meantime.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 367556)
Time Spent: 1.5h (was: 1h 20m)
> SchemaCoder equals should not rely on from/toRowFunction equality
> -----------------------------------------------------------------
>
> Key: BEAM-9041
> URL: https://issues.apache.org/jira/browse/BEAM-9041
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Minor
> Fix For: 2.18.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> SchemaCoder equals implementation relies on SerializableFunction equals
> method, this is error-prone because users rarely implement the equals method
> for a SerializableFunction. One alternative would be to rely on bytes
> equality for this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)