Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/23531 )
Change subject: KUDU-3708 Create Python example for array datatype ...................................................................... Patch Set 1: (6 comments) http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py File examples/python/basic-python-example/array_example.py: http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@30 PS1, Line 30: # Parse arguments : parser = argparse.ArgumentParser(description='Array Data Type Example for Kudu Python.') : parser.add_argument('--masters', '-m', nargs='+', default='localhost', : help='The master address(es) to connect to Kudu.') : parser.add_argument('--ports', '-p', nargs='+', default='7051', : help='The master server port(s) to connect to Kudu.') : args = parser.parse_args() main() function? Minimal modular programing please (e.g. create_shema function like in the c++ example) http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@89 PS1, Line 89: try: : session.flush() : except kudu.KuduBadStatus: : print(session.get_pending_errors()) Why do we prevent this to drop an error? Should we not stop execution here and return with a non-zero value? Please explain what is the purpose of this kind of error handling? http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@124 PS1, Line 124: try: : session.flush() : except kudu.KuduBadStatus: : print(session.get_pending_errors()) Why do we continue? http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@139 PS1, Line 139: op['arr_int64'] = [] # Empty array nit: Please remove redundant comments like this. You already commented in line 137. And hopefully anyone reading this knows [] is empty array. http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@144 PS1, Line 144: try: : session.flush() : except kudu.KuduBadStatus: : print(session.get_pending_errors()) Same as above? http://gerrit.cloudera.org:8080/#/c/23531/1/examples/python/basic-python-example/array_example.py@162 PS1, Line 162: try: : session.flush() : except kudu.KuduBadStatus: : print(session.get_pending_errors()) same -- To view, visit http://gerrit.cloudera.org:8080/23531 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4a84ee9731efdc802673bb964d358b07648b3fae Gerrit-Change-Number: 23531 Gerrit-PatchSet: 1 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Wed, 15 Oct 2025 08:52:11 +0000 Gerrit-HasComments: Yes
