[
https://issues.apache.org/jira/browse/BEAM-8111?focusedWorklogId=310983&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-310983
]
ASF GitHub Bot logged work on BEAM-8111:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Sep/19 20:33
Start Date: 11/Sep/19 20:33
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on pull request #9446:
[BEAM-8111] Enable CloudObjectsTest$DefaultCoders
URL: https://github.com/apache/beam/pull/9446#discussion_r323445919
##########
File path:
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaCoder.java
##########
@@ -100,4 +99,47 @@ public boolean consistentWithEquals() {
public String toString() {
return "SchemaCoder: " + rowCoder.toString();
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SchemaCoder<?> that = (SchemaCoder<?>) o;
+ return rowCoder.equals(that.rowCoder)
+ && toRowFunction.equals(that.toRowFunction)
+ && fromRowFunction.equals(that.fromRowFunction);
Review comment:
Yeah - I discussed this offline a bit with @kennknowles and he convinced me
that it was better to have an equals function that might have some false
negatives (if the toRowFunction and fromRowFunction don't have a good equals),
rather than one that could have false positives (like if we rely on just
checking the schema and typeDescriptor, and assume that the toRow/fromRow are
the same).
I managed to make the CloudObjectsTest work by adding RowIdentity with an
equals() function here.
----------------------------------------------------------------
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: 310983)
Time Spent: 3h (was: 2h 50m)
> SchemaCoder broken on DataflowRunner
> ------------------------------------
>
> Key: BEAM-8111
> URL: https://issues.apache.org/jira/browse/BEAM-8111
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow, sdk-java-core
> Affects Versions: 2.15.0
> Reporter: Brian Hulette
> Assignee: Brian Hulette
> Priority: Blocker
> Fix For: 2.16.0
>
> Time Spent: 3h
> Remaining Estimate: 0h
>
> https://github.com/apache/beam/commit/e65c176a9f34e45d408281e1101a2ae54cef0f6c
> broke SchemaCoder on Dataflow. When translating a schema that uses logical
> types from a cloud object dataflow encounters a runtime error.
> This means any pipelines that use SqlTransform or schema transforms will fail
> on Dataflow in 2.15.0
--
This message was sent by Atlassian Jira
(v8.3.2#803003)