Rename from_iterable to avoid confusion.
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/cf15ab51 Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/cf15ab51 Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/cf15ab51 Branch: refs/heads/python-sdk Commit: cf15ab51efa9c8bb21f00eee255f0c57e41a8e7b Parents: a50efcc Author: Robert Bradshaw <rober...@google.com> Authored: Tue Oct 18 12:31:30 2016 -0700 Committer: Robert Bradshaw <rober...@google.com> Committed: Tue Oct 18 12:31:30 2016 -0700 ---------------------------------------------------------------------- sdks/python/apache_beam/pvalue.py | 8 ++++---- sdks/python/apache_beam/transforms/sideinputs.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/cf15ab51/sdks/python/apache_beam/pvalue.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/pvalue.py b/sdks/python/apache_beam/pvalue.py index e40d746..4cfdfbe 100644 --- a/sdks/python/apache_beam/pvalue.py +++ b/sdks/python/apache_beam/pvalue.py @@ -268,7 +268,7 @@ class SingletonPCollectionView(PCollectionView): return base @staticmethod - def from_iterable(it, options): + def _from_runtime_iterable(it, options): head = list(itertools.islice(it, 2)) if len(head) == 0: return options.get('default', EmptySideInput()) @@ -284,7 +284,7 @@ class IterablePCollectionView(PCollectionView): """A PCollectionView that can be treated as an iterable.""" @staticmethod - def from_iterable(it, options): + def _from_runtime_iterable(it, options): return it @@ -292,7 +292,7 @@ class ListPCollectionView(PCollectionView): """A PCollectionView that can be treated as a list.""" @staticmethod - def from_iterable(it, options): + def _from_runtime_iterable(it, options): return list(it) @@ -300,7 +300,7 @@ class DictPCollectionView(PCollectionView): """A PCollectionView that can be treated as a dict.""" @staticmethod - def from_iterable(it, options): + def _from_runtime_iterable(it, options): return dict(it) http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/cf15ab51/sdks/python/apache_beam/transforms/sideinputs.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/transforms/sideinputs.py b/sdks/python/apache_beam/transforms/sideinputs.py index f3a7178..05ba6ab 100644 --- a/sdks/python/apache_beam/transforms/sideinputs.py +++ b/sdks/python/apache_beam/transforms/sideinputs.py @@ -188,7 +188,7 @@ class SideInputMap(object): def __getitem__(self, window): if window not in self._cache: target_window = self._window_mapping_fn(window) - self._cache[window] = self._view_class.from_iterable( + self._cache[window] = self._view_class._from_runtime_iterable( _FilteringIterable(self._iterable, target_window), self._view_options) return self._cache[window]