def apply_GroupByKey(self, transform, pcoll): coder = self._get_coder(pcoll.element_type or typehints.Any, None) if not coder.is_kv_coder(): raise ValueError( ('Coder for the GroupByKey operation "%s" is not a ' 'key-value coder: %s.') % (transform.label, coder)) # TODO(robertwb): Update the coder itself if it changed. coders.registry.verify_deterministic( coder.key_coder(), 'GroupByKey operation "%s"' % transform.label) return pvalue.PCollection(pcoll.pipeline)
def apply_CombineValues(self, transform, pcoll): return pvalue.PCollection(pcoll.pipeline)
def apply(self, pbegin): assert isinstance(pbegin, pvalue.PBegin) self.pipeline = pbegin.pipeline return pvalue.PCollection(self.pipeline)
def apply(self, pcoll): self.side_output_tags = set() # TODO(robertwb): Change all uses of the dofn attribute to use fn instead. self.dofn = self.fn return pvalue.PCollection(pcoll.pipeline)
def apply(self, pcolls): for pcoll in pcolls: self._check_pcollection(pcoll) return pvalue.PCollection(self.pipeline)
def apply(self, pcoll): self._check_pcollection(pcoll) return pvalue.PCollection(pcoll.pipeline)