[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 18:17
Start Date: 08/Jan/20 18:17
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-572153724
 
 
   Run Java PreCommit
 

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: 368325)
Time Spent: 4h 20m  (was: 4h 10m)

> 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: 4h 20m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 18:17
Start Date: 08/Jan/20 18:17
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526
 
 
   
 

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: 368326)
Time Spent: 4.5h  (was: 4h 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: 4.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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 16:41
Start Date: 08/Jan/20 16:41
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-572153724
 
 
   Run Java PreCommit
 

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: 368258)
Time Spent: 4h 10m  (was: 4h)

> 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: 4h 10m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 10:52
Start Date: 08/Jan/20 10:52
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-571996029
 
 
   Run Java PreCommit
 

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: 368128)
Time Spent: 4h  (was: 3h 50m)

> 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: 4h
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 10:51
Start Date: 08/Jan/20 10:51
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-571996029
 
 
   Run Java PreCommit
 

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: 368125)
Time Spent: 3h 50m  (was: 3h 40m)

> 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: 3h 50m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 08:25
Start Date: 08/Jan/20 08:25
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-571941691
 
 
   Run Java PreCommit
 

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: 368060)
Time Spent: 3.5h  (was: 3h 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: 3.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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-08 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 08:25
Start Date: 08/Jan/20 08:25
Worklog Time Spent: 10m 
  Work Description: iemejia commented on issue #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526#issuecomment-571941691
 
 
   Run Java PreCommit
 

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: 368061)
Time Spent: 3h 40m  (was: 3.5h)

> 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: 3h 40m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 01:15
Start Date: 08/Jan/20 01:15
Worklog Time Spent: 10m 
  Work Description: TheNeuralBit 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-571847154
 
 
   Not at all, sorry I didn't approve sooner.
 

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: 367904)
Time Spent: 3h 20m  (was: 3h 10m)

> 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: 3h 20m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 00:26
Start Date: 08/Jan/20 00:26
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-571835615
 
 
   Sorry if I rushed a bit the merge @TheNeuralBit I just wanted to cherry pick 
it to unblock 2.18.0 release.
 

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: 367881)
Time Spent: 3h 10m  (was: 3h)

> 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: 3h 10m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 00:23
Start Date: 08/Jan/20 00:23
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10526: 
[release-2.18.0][BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on 
from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10526
 
 
   Cherry picks the fixes for both pending issues.
   
   R: @udim 
   CC: @TheNeuralBit 
 

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: 367880)
Time Spent: 3h  (was: 2h 50m)

> 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: 3h
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 00:17
Start Date: 08/Jan/20 00:17
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-571833418
 
 
   Merging now that the tests are green. 
 

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: 367879)
Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 08/Jan/20 00:17
Start Date: 08/Jan/20 00:17
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10492: [BEAM-9041, 
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492
 
 
   
 

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: 367878)
Time Spent: 2h 40m  (was: 2.5h)

> 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: 2h 40m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 22:56
Start Date: 07/Jan/20 22:56
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-571811579
 
 
   Run Java PreCommit
 

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: 367848)
Time Spent: 2h 20m  (was: 2h 10m)

> 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: 2h 20m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 22:56
Start Date: 07/Jan/20 22:56
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-571811579
 
 
   Run Java PreCommit
 

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: 367849)
Time Spent: 2.5h  (was: 2h 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: 2.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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 21:55
Start Date: 07/Jan/20 21:55
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10492: [BEAM-9041, 
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363970136
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##
 @@ -431,7 +465,47 @@ public static GenericRecord toGenericRecord(
*/
   public static SerializableFunction 
getRowToGenericRecordFunction(
   @Nullable org.apache.avro.Schema avroSchema) {
-return g -> toGenericRecord(g, avroSchema);
+return new RowToGenericRecordFn(avroSchema);
+  }
+
+  private static class RowToGenericRecordFn implements 
SerializableFunction {
+private transient org.apache.avro.Schema avroSchema;
+
+RowToGenericRecordFn(@Nullable org.apache.avro.Schema avroSchema) {
+  this.avroSchema = avroSchema;
+}
+
+@Override
+public GenericRecord apply(Row input) {
+  return toGenericRecord(input, avroSchema);
+}
+
+@Override
+public boolean equals(Object other) {
+  if (this == other) {
+return true;
+  }
+  if (other == null || getClass() != other.getClass()) {
+return false;
+  }
+  RowToGenericRecordFn that = (RowToGenericRecordFn) other;
+  return avroSchema.equals(that.avroSchema);
+}
+
+@Override
+public int hashCode() {
+  return Objects.hash(avroSchema);
+}
+
+private void writeObject(ObjectOutputStream out) throws IOException {
+  final String avroSchemaAsString = (avroSchema == null) ? null : 
avroSchema.toString();
+  out.writeObject(avroSchemaAsString);
+}
+
+private void readObject(ObjectInputStream in) throws IOException, 
ClassNotFoundException {
+  final String avroSchemaAsString = (String) in.readObject();
+  avroSchema = new 
org.apache.avro.Schema.Parser().parse(avroSchemaAsString);
 
 Review comment:
   Yes you are right I forgot to check the nullability of the string before the 
parse, I will fix that and add a method for this. Hopefully everything will be 
green at that moment. Thanks for the hint.
 

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: 367798)
Time Spent: 2h 10m  (was: 2h)

> 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: 2h 10m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 19:39
Start Date: 07/Jan/20 19:39
Worklog Time Spent: 10m 
  Work Description: TheNeuralBit commented on pull request #10492: 
[BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction 
equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363916612
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##
 @@ -431,7 +465,47 @@ public static GenericRecord toGenericRecord(
*/
   public static SerializableFunction 
getRowToGenericRecordFunction(
   @Nullable org.apache.avro.Schema avroSchema) {
-return g -> toGenericRecord(g, avroSchema);
+return new RowToGenericRecordFn(avroSchema);
+  }
+
+  private static class RowToGenericRecordFn implements 
SerializableFunction {
+private transient org.apache.avro.Schema avroSchema;
+
+RowToGenericRecordFn(@Nullable org.apache.avro.Schema avroSchema) {
+  this.avroSchema = avroSchema;
+}
+
+@Override
+public GenericRecord apply(Row input) {
+  return toGenericRecord(input, avroSchema);
+}
+
+@Override
+public boolean equals(Object other) {
+  if (this == other) {
+return true;
+  }
+  if (other == null || getClass() != other.getClass()) {
+return false;
+  }
+  RowToGenericRecordFn that = (RowToGenericRecordFn) other;
+  return avroSchema.equals(that.avroSchema);
+}
+
+@Override
+public int hashCode() {
+  return Objects.hash(avroSchema);
+}
+
+private void writeObject(ObjectOutputStream out) throws IOException {
+  final String avroSchemaAsString = (avroSchema == null) ? null : 
avroSchema.toString();
+  out.writeObject(avroSchemaAsString);
+}
+
+private void readObject(ObjectInputStream in) throws IOException, 
ClassNotFoundException {
+  final String avroSchemaAsString = (String) in.readObject();
+  avroSchema = new 
org.apache.avro.Schema.Parser().parse(avroSchemaAsString);
 
 Review comment:
   I'm not 100% sure but it looks like the failures are occurring when 
avroSchema is null. Either way I think you need to check if 
`avroSchemaAsString` is null 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:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 367699)
Time Spent: 2h  (was: 1h 50m)

> 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: 2h
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 19:34
Start Date: 07/Jan/20 19:34
Worklog Time Spent: 10m 
  Work Description: TheNeuralBit commented on pull request #10492: 
[BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction 
equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363911955
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/SchemaCoder.java
 ##
 @@ -102,7 +102,8 @@ protected SchemaCoder(
 
   /**
* Returns a {@link SchemaCoder} for the specified class. If no schema is 
registered for this
-   * class, then throws {@link NoSuchSchemaException}.
+   * class, then throws {@link NoSuchSchemaException}. The parameter functions 
to convert from and
+   * to Rows must implement the equals contract.
 
 Review comment:
   :+1: thanks!
 

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: 367692)
Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 17:13
Start Date: 07/Jan/20 17:13
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-571682167
 
 
   PR updated I used your equals suggestion to tackle the first part instead of 
the byte equality change and improved the serialization issue of the internal 
Avro schema. Now we should be good to go. PTAL @TheNeuralBit 
 

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: 367566)
Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


 [ 
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:
us...@infra.apache.org


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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-07 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 15:27
Start Date: 07/Jan/20 15:27
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-571635013
 
 
   I see the things more clearly now, thanks for the explanation @TheNeuralBit. 
I was not aware of the goals of the other PR. I have one question related to 
that PR. Why did you use the strict conversion (no widening/narrowing) from/to 
row only on the schemaCoder that generates GenericRecords 
`AvroUtils#schemaCoder(java.lang.Class)` and not in the others. Or maybe the 
real question is why we need to do this strictly?
 

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: 367508)
Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 02:36
Start Date: 07/Jan/20 02:36
Worklog Time Spent: 10m 
  Work Description: kennknowles 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-571406505
 
 
   Hmm. I am torn on this. I agree with @TheNeuralBit that mostly these 
conversions should just own their own `equals`. But I see how 
`SerializableFunction`, especially lambdas, will usually not implement this.
   
   In the case of the `SchemaCoder` it is often automated, isn't it? And when 
it isn't, it is fair that it is a one-time up front effort to write a slightly 
larger class that has a good `equals`. We could provide a convenient base 
class, I guess, or even now add a `default` implementation in the functional 
interface maybe?
 

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: 367178)
Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 07/Jan/20 00:50
Start Date: 07/Jan/20 00:50
Worklog Time Spent: 10m 
  Work Description: TheNeuralBit 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-571381848
 
 
   Sorry revert was a poor choice of words. I just meant a big part of that PR
   was making equals work for the functions produced by
   GetterBasedSchemaProvider so I would like it if they continued to be used.
   For a function without any state I would write the equals function to just
   compare this.getClass().equals(other.getClass()) since any two instances
   will do the same thing.
   
   On Mon, Jan 6, 2020 at 2:00 PM Ismaël Mejía 
   wrote:
   
   > This is not a revert. Previous version did not compare from/toRow
   > functions for equality. Do you have any suggestion on how to compare both
   > functions? It is not really clear to me how to do so in particular for
   > functions with no state.
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or unsubscribe
   > 

   > .
   >
   
 

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: 367138)
Time Spent: 1h  (was: 50m)

> 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: 1h
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 06/Jan/20 22:00
Start Date: 06/Jan/20 22:00
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-571333837
 
 
   This is not a revert. Previous version did not compare from/toRow functions 
for equality. Do you have any suggestion on how to compare both functions? It 
is not really clear to me how to do so in particular for functions with no 
state.
 

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: 367017)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 06/Jan/20 21:47
Start Date: 06/Jan/20 21:47
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10492: [BEAM-9041, 
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363497491
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##
 @@ -431,7 +431,20 @@ public static GenericRecord toGenericRecord(
*/
   public static SerializableFunction 
getRowToGenericRecordFunction(
   @Nullable org.apache.avro.Schema avroSchema) {
-return g -> toGenericRecord(g, avroSchema);
+return new RowToGenericRecordFn(avroSchema);
+  }
+
+  private static class RowToGenericRecordFn implements 
SerializableFunction {
+private final transient org.apache.avro.Schema avroSchema;
+
+RowToGenericRecordFn(@Nullable org.apache.avro.Schema avroSchema) {
+  this.avroSchema = avroSchema;
+}
+
+@Override
+public GenericRecord apply(Row input) {
+  return toGenericRecord(input, avroSchema);
+}
 
 Review comment:
   This is a second different issue about capture of Avro schema on 
serialization (the key change is the transient part) so not really related to 
equals. As explained above I put both together because I use equality to 
validate the roundtrip of serialization/deserialization. 
 

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: 367015)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 06/Jan/20 21:44
Start Date: 06/Jan/20 21:44
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10492: [BEAM-9041, 
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363497491
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##
 @@ -431,7 +431,20 @@ public static GenericRecord toGenericRecord(
*/
   public static SerializableFunction 
getRowToGenericRecordFunction(
   @Nullable org.apache.avro.Schema avroSchema) {
-return g -> toGenericRecord(g, avroSchema);
+return new RowToGenericRecordFn(avroSchema);
+  }
+
+  private static class RowToGenericRecordFn implements 
SerializableFunction {
+private final transient org.apache.avro.Schema avroSchema;
+
+RowToGenericRecordFn(@Nullable org.apache.avro.Schema avroSchema) {
+  this.avroSchema = avroSchema;
+}
+
+@Override
+public GenericRecord apply(Row input) {
+  return toGenericRecord(input, avroSchema);
+}
 
 Review comment:
   This is a second different issue about capture of Avro schema on 
serialization so not really related to equals. As explained above I put both 
together because I use equality to validate the roundtrip of 
serialization/deserialization.
 

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: 367013)
Time Spent: 0.5h  (was: 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: 0.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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-06 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 06/Jan/20 19:21
Start Date: 06/Jan/20 19:21
Worklog Time Spent: 10m 
  Work Description: TheNeuralBit commented on pull request #10492: 
[BEAM-9041, BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction 
equality
URL: https://github.com/apache/beam/pull/10492#discussion_r363438212
 
 

 ##
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java
 ##
 @@ -431,7 +431,20 @@ public static GenericRecord toGenericRecord(
*/
   public static SerializableFunction 
getRowToGenericRecordFunction(
   @Nullable org.apache.avro.Schema avroSchema) {
-return g -> toGenericRecord(g, avroSchema);
+return new RowToGenericRecordFn(avroSchema);
+  }
+
+  private static class RowToGenericRecordFn implements 
SerializableFunction {
+private final transient org.apache.avro.Schema avroSchema;
+
+RowToGenericRecordFn(@Nullable org.apache.avro.Schema avroSchema) {
+  this.avroSchema = avroSchema;
+}
+
+@Override
+public GenericRecord apply(Row input) {
+  return toGenericRecord(input, avroSchema);
+}
 
 Review comment:
   Couldn't you just implement `equals` here instead of changing to comparing 
byte equality of the serialized function in SchemaCoder? 
 

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: 366868)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  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)


[jira] [Work logged] (BEAM-9041) SchemaCoder equals should not rely on from/toRowFunction equality

2020-01-02 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on BEAM-9041:


Author: ASF GitHub Bot
Created on: 03/Jan/20 00:11
Start Date: 03/Jan/20 00:11
Worklog Time Spent: 10m 
  Work Description: iemejia commented on pull request #10492: [BEAM-9041, 
BEAM-9042] SchemaCoder equals should not rely on from/toRowFunction equality
URL: https://github.com/apache/beam/pull/10492
 
 
   I did this PR with the two fixes for two reasons (1) because one fix 
depended on the other, and (2) to make it easier to validate/cherry pick into 
2.18.0's branch.
   
   BEAM-9041: Don't rely on equality for the from/to functions in `SchemaCoder` 
because nobody implements equals on `SerializableFunction`. I tried to do this 
with byte equality, maybe there is a better way to do it but I could not think 
of another.
   BEAM-9042: Since Avro's `Schema` class is not `Serializable` I made it 
`transient`. Another approach could have been to transform the Schema into a 
String and include it but so far it does not look necessary since this is a 
parameter once the fn is deserialized.
   
   R: @TheNeuralBit 
 

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: 365552)
Remaining Estimate: 0h
Time Spent: 10m

> 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: 10m
>  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)