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

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

                Author: ASF GitHub Bot
            Created on: 20/Aug/20 01:39
            Start Date: 20/Aug/20 01:39
    Worklog Time Spent: 10m 
      Work Description: youngoli commented on pull request #12627:
URL: https://github.com/apache/beam/pull/12627#issuecomment-676845955


   I think I originally wrote it the way it was because the split helper easier 
to grok on its own if it returned the fraction in relation to the entire 
element. That is, if it returns element 2 fraction 0.8 it means split at 2.8. 
It's a little tougher to grok if the fraction returned is a fraction of 
remaining work in the element.
   
   But looking at it again it seems better to just add that logic into the 
helper function anyway. The helper's only used in DataSource.Split, and it only 
exists to make the splitting logic easily testable, so it doesn't need to be 
intuitive at a glance. Anyone reading it should read would be reading it as 
part of DataSource.Split, and would understand the context: the fraction is 
getting sent to the SDF's split call so the helper just follows the kind of 
fraction that an SDF's TrySplit expects.
   
   TL;DR: I moved the logic into the helper function and added some test cases 
to validate it.


----------------------------------------------------------------
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: 472714)
    Time Spent: 4h 40m  (was: 4.5h)

> Implement dynamic splitting support for SDFs in Go SDK.
> -------------------------------------------------------
>
>                 Key: BEAM-10289
>                 URL: https://issues.apache.org/jira/browse/BEAM-10289
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-go
>            Reporter: Daniel Oliveira
>            Assignee: Daniel Oliveira
>            Priority: P2
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to