Hello Jordan Birdsell,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/5019

to review the following change.

Change subject: python: allow passing single strings instead of lists in more 
places
......................................................................

python: allow passing single strings instead of lists in more places

Several of our APIs take lists of column names, but it's easy to
accidentally just pass a string. If we naively iterate over the string,
we end up interpreting "foo" as ["f", "o", "o"] which is obviously
incorrect.

This patch takes the approach of detecting the string argument and
converting to a singleton list.

An alternative would have been to raise TypeError, but it seems like we
do this conversion in other places, so I decided to be consistent.

Change-Id: I1a81dea5356b66b8860d22f9ee2935072fd4cd6c
---
M python/kudu/client.pyx
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/19/5019/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5019
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a81dea5356b66b8860d22f9ee2935072fd4cd6c
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Jordan Birdsell <[email protected]>

Reply via email to