[
https://issues.apache.org/jira/browse/BEAM-5320?focusedWorklogId=167388&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-167388
]
ASF GitHub Bot logged work on BEAM-5320:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Nov/18 13:44
Start Date: 19/Nov/18 13:44
Worklog Time Spent: 10m
Work Description: RobbeSneyders commented on a change in pull request
#7029: [BEAM-5320] Finish Python 3 porting for testing module
URL: https://github.com/apache/beam/pull/7029#discussion_r234622244
##########
File path: sdks/python/apache_beam/testing/test_utils.py
##########
@@ -79,7 +79,7 @@ def compute_hash(content, hashing_alg=DEFAULT_HASHING_ALG):
content.sort()
m = hashlib.new(hashing_alg)
for elem in content:
- m.update(str(elem).encode('utf-8'))
+ m.update(elem)
Review comment:
This fails on `None` values introduced in [this
test](https://github.com/apache/beam/blob/8db6b63276f6e749f095b5817b22efb431e22e6b/sdks/python/apache_beam/io/gcp/tests/bigquery_matcher_test.py#L54).
However the documentation of the current function indicates that it expects
a list of strings. I also can't think of a scenario where BigQuery returns a
list of `None` values for rows from a query. I'm therefore wondering if this is
a problem with the current function, or the test should be changed.
Previously, this function just casted `None` to `"None"` before calculating
the hash.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 167388)
Time Spent: 2.5h (was: 2h 20m)
> Finish Python 3 porting for testing module
> ------------------------------------------
>
> Key: BEAM-5320
> URL: https://issues.apache.org/jira/browse/BEAM-5320
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Robbe
> Assignee: Robbe
> Priority: Major
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)