[ 
https://issues.apache.org/jira/browse/BEAM-3279?focusedWorklogId=214193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-214193
 ]

ASF GitHub Bot logged work on BEAM-3279:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Mar/19 07:41
            Start Date: 16/Mar/19 07:41
    Worklog Time Spent: 10m 
      Work Description: AlexKbit commented on pull request #8071: [BEAM-3279] 
Deprecate and remove Coder.consistentWithEquals
URL: https://github.com/apache/beam/pull/8071#discussion_r266193027
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/coders/BigEndianShortCoder.java
 ##########
 @@ -62,16 +62,6 @@ public Short decode(InputStream inStream) throws 
IOException, CoderException {
   @Override
   public void verifyDeterministic() {}
 
-  /**
-   * {@inheritDoc}
-   *
-   * @return {@code true}. This coder is injective.
-   */
-  @Override
-  public boolean consistentWithEquals() {
 
 Review comment:
   As I understand all coders by default have base structuralValue from 
org.apache.beam.sdk.coders.Coder#structuralValue.
   I think each of them doesn't need an implementation of structuralValue.
   And we have some coders that override base behaviour of structuralValue.
   
   I have found two tests which are broken (because they expect true result for 
consistentWithEquals)
   org.apache.beam.sdk.coders.MapCoderTest > testConsistentWithEquals FAILED
   org.apache.beam.sdk.coders.ListCoderTest > testConsistentWithEquals FAILED
   by this reason I didn't remove overriding of consistentWithEquals from:
   - org.apache.beam.sdk.coders.MapCoder
   - org.apache.beam.sdk.coders.ListCoder
   
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 214193)
    Time Spent: 0.5h  (was: 20m)

> Deprecate and remove Coder consistentWithEquals in favor of overriding 
> structuredValue
> --------------------------------------------------------------------------------------
>
>                 Key: BEAM-3279
>                 URL: https://issues.apache.org/jira/browse/BEAM-3279
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Kenneth Knowles
>            Assignee: Alexander Savchenko
>            Priority: Minor
>              Labels: starter
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Summary of discussion linked below:
> consistentWithEquals() is redundant w.r.t. structuralValue(), and should be 
> deprecated. I think our mutation detectors are already using 
> structuralValue(), so the work here would be to simply mark the method 
> deprecated, remove all remaining overrides in the SDK, and document that 
> overriding the method is a no-op.
> https://lists.apache.org/thread.html/8b2dcf09ba8e46b3c008293d99e4028d10463148b68326687dc29a4d@%3Cdev.beam.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to