Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/19590 )
Change subject: IMPALA-11975: Fix Dictionary methods to work with Python 3 ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/19590/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/19590/2//COMMIT_MSG@18 PS2, Line 18: locations to items(), vaules(), keys(), etc. Python 2 > typo: vaules -> values Done http://gerrit.cloudera.org:8080/#/c/19590/2/tests/comparison/query_generator.py File tests/comparison/query_generator.py: http://gerrit.cloudera.org:8080/#/c/19590/2/tests/comparison/query_generator.py@1443 PS2, Line 1443: return_type = choice(list(null_args_by_type.keys())) > I'm surprised this is necessary. Yeah, it is weird, but it really is necessary: >>> from random import choice >>> d = {"a": "a", "b": "b", "c": "c"} >>> choice(d) TypeError: 'dict_keys' object is not subscriptable >>> choice(list(d)) 'c' -- To view, visit http://gerrit.cloudera.org:8080/19590 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie873ece54a633a8a95ed4600b1df4be7542348da Gerrit-Change-Number: 19590 Gerrit-PatchSet: 2 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Comment-Date: Wed, 08 Mar 2023 19:39:37 +0000 Gerrit-HasComments: Yes
