You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bh...@apache.org on 2020/06/17 22:04:40 UTC

[beam] 01/01: str -> unicode to fix python 2 failure

This is an automated email from the ASF dual-hosted git repository.

bhulette pushed a commit to branch beam-10273
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 6e53b46758a3e1fd20fcea091c922d211e30c4a7
Author: Brian Hulette <bh...@google.com>
AuthorDate: Wed Jun 17 15:04:20 2020 -0700

    str -> unicode to fix python 2 failure
---
 sdks/python/apache_beam/transforms/sql_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/python/apache_beam/transforms/sql_test.py b/sdks/python/apache_beam/transforms/sql_test.py
index 8c9e1d5..8c2dae3 100644
--- a/sdks/python/apache_beam/transforms/sql_test.py
+++ b/sdks/python/apache_beam/transforms/sql_test.py
@@ -143,7 +143,7 @@ class SqlTransformTest(unittest.TestCase):
       out = (
           p
           | beam.Create([1, 2, 10])
-          | beam.Map(lambda x: beam.Row(a=x, b=str(x)))
+          | beam.Map(lambda x: beam.Row(a=x, b=unicode(x)))
           | SqlTransform("SELECT a*a as s, LENGTH(b) AS c FROM PCOLLECTION"))
       assert_that(out, equal_to([(1, 1), (4, 1), (100, 2)]))