You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/19 00:58:07 UTC

[GitHub] [beam] lostluck commented on a change in pull request #11144: [BEAM-3301] Perform SDF validation (missing RestrictionTrackers).

lostluck commented on a change in pull request #11144: [BEAM-3301] Perform SDF validation (missing RestrictionTrackers).
URL: https://github.com/apache/beam/pull/11144#discussion_r394618692
 
 

 ##########
 File path: sdks/go/pkg/beam/core/graph/fn.go
 ##########
 @@ -196,13 +217,31 @@ func (f *DoFn) Name() string {
 
 // IsSplittable returns whether the DoFn is a valid Splittable DoFn.
 func (f *DoFn) IsSplittable() bool {
-	return false // TODO(BEAM-3301): Implement this when we add SDFs.
+	isSdf, _ := validateSdfMethodsPresent((*Fn)(f))
 
 Review comment:
   A semantic note: the error shouldn't be ignored. Semantically if a function returns an error, the non error return values are not guaranteed to be valid. 
   So conventionally, the way to handle IsSplittable here is to check for the error, and return false if not nil, and otherwise return what the boolean is.

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


With regards,
Apache Git Services