You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yingchun Lai (Code Review)" <ge...@cloudera.org> on 2023/07/19 16:53:02 UTC
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Hello Attila Bukor, Kudu Jenkins, Wenzhe Zhou,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/20226
to review the following change.
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
KUDU-1945 Add Python example for non-unique PK
In commit 3019848d00ac721b30d98a1aeb77bc205352b7b5 a C++ client example
has been added to showcase the usage of the non-unique PK. This patch
translates this particular example to Python.
The C++ examples are tested during upstream submission, however the Java
and Python client examples are not tested automatically. Therefore,
I did manual testing and created a ticket to track this improvement:
KUDU-3478.
Manual testing has been done using the following configurations:
Ubuntu 18.04 x86_64: Python2.7
Ubuntu 18.04 x86_64: Python3.7
macOS Monterey M1(arm64): Python3.7
(I couldn't setup the Python2.7 interpreter properly on my mac)
STDOUT of the example:
kudu.Schema {
non_unique_key int32 NOT NULL
auto_incrementing_id int64 NOT NULL
int_val int32 NOT NULL
PRIMARY KEY (non_unique_key, auto_incrementing_id)
}
Demonstrating scanning ...
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Scanned some row(s) WHERE non_unique_key = 1
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
Demonstrating UPDATE ...
Updated row(s) WHERE non_unique_key = 1 AND int_val = 2 to int_val = 98
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Updated row(s) WHERE non_unique_key = 2 to int_val = 99
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Updated row(s) WHERE non_unique_key = 2 AND auto_incrementing_id = 5\
to int_val = 100
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Demonstrating DELETE ...
Deleted row(s) WHERE non_unique_key = 3 AND int_val = 1
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Deleted row(s) WHERE non_unique_key = 2
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted row(s) WHERE non_unique_key = 3 AND auto_incrementing_id = 3
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted the table
Done
Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Reviewed-on: http://gerrit.cloudera.org:8080/19874
Tested-by: Kudu Jenkins
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
(cherry picked from commit 6d48cd6f90e7820fbabd0560139ad48fe9d66a29)
---
A examples/python/basic-python-example/non_unique_primary_key.py
1 file changed, 221 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/20226/1
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/20226 )
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
Patch Set 2: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Fri, 21 Jul 2023 03:56:36 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20226 )
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
KUDU-1945 Add Python example for non-unique PK
In commit 3019848d00ac721b30d98a1aeb77bc205352b7b5 a C++ client example
has been added to showcase the usage of the non-unique PK. This patch
translates this particular example to Python.
The C++ examples are tested during upstream submission, however the Java
and Python client examples are not tested automatically. Therefore,
I did manual testing and created a ticket to track this improvement:
KUDU-3478.
Manual testing has been done using the following configurations:
Ubuntu 18.04 x86_64: Python2.7
Ubuntu 18.04 x86_64: Python3.7
macOS Monterey M1(arm64): Python3.7
(I couldn't setup the Python2.7 interpreter properly on my mac)
STDOUT of the example:
kudu.Schema {
non_unique_key int32 NOT NULL
auto_incrementing_id int64 NOT NULL
int_val int32 NOT NULL
PRIMARY KEY (non_unique_key, auto_incrementing_id)
}
Demonstrating scanning ...
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Scanned some row(s) WHERE non_unique_key = 1
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
Demonstrating UPDATE ...
Updated row(s) WHERE non_unique_key = 1 AND int_val = 2 to int_val = 98
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Updated row(s) WHERE non_unique_key = 2 to int_val = 99
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Updated row(s) WHERE non_unique_key = 2 AND auto_incrementing_id = 5\
to int_val = 100
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Demonstrating DELETE ...
Deleted row(s) WHERE non_unique_key = 3 AND int_val = 1
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Deleted row(s) WHERE non_unique_key = 2
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted row(s) WHERE non_unique_key = 3 AND auto_incrementing_id = 3
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted the table
Done
Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Reviewed-on: http://gerrit.cloudera.org:8080/19874
Tested-by: Kudu Jenkins
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
(cherry picked from commit 6d48cd6f90e7820fbabd0560139ad48fe9d66a29)
Reviewed-on: http://gerrit.cloudera.org:8080/20226
Reviewed-by: Marton Greber <gr...@gmail.com>
Reviewed-by: Yifan Zhang <ch...@163.com>
Tested-by: Yingchun Lai <la...@apache.org>
---
A examples/python/basic-python-example/non_unique_primary_key.py
1 file changed, 221 insertions(+), 0 deletions(-)
Approvals:
Marton Greber: Looks good to me, but someone else must approve
Yifan Zhang: Looks good to me, approved
Yingchun Lai: Verified
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: merged
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 3
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has removed a vote on this change.
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/20226 )
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Fri, 21 Jul 2023 01:45:52 +0000
Gerrit-HasComments: No
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Attila Bukor, Kudu Jenkins, Wenzhe Zhou,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/20226
to look at the new patch set (#2).
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
KUDU-1945 Add Python example for non-unique PK
In commit 3019848d00ac721b30d98a1aeb77bc205352b7b5 a C++ client example
has been added to showcase the usage of the non-unique PK. This patch
translates this particular example to Python.
The C++ examples are tested during upstream submission, however the Java
and Python client examples are not tested automatically. Therefore,
I did manual testing and created a ticket to track this improvement:
KUDU-3478.
Manual testing has been done using the following configurations:
Ubuntu 18.04 x86_64: Python2.7
Ubuntu 18.04 x86_64: Python3.7
macOS Monterey M1(arm64): Python3.7
(I couldn't setup the Python2.7 interpreter properly on my mac)
STDOUT of the example:
kudu.Schema {
non_unique_key int32 NOT NULL
auto_incrementing_id int64 NOT NULL
int_val int32 NOT NULL
PRIMARY KEY (non_unique_key, auto_incrementing_id)
}
Demonstrating scanning ...
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Scanned some row(s) WHERE non_unique_key = 1
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 2)
Demonstrating UPDATE ...
Updated row(s) WHERE non_unique_key = 1 AND int_val = 2 to int_val = 98
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 1)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 2)
Updated row(s) WHERE non_unique_key = 2 to int_val = 99
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Updated row(s) WHERE non_unique_key = 2 AND auto_incrementing_id = 5\
to int_val = 100
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Demonstrating DELETE ...
Deleted row(s) WHERE non_unique_key = 3 AND int_val = 1
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
(non_unique_key: 2, auto_incrementing_id: 4, int_val: 99)
(non_unique_key: 2, auto_incrementing_id: 5, int_val: 100)
(non_unique_key: 2, auto_incrementing_id: 6, int_val: 99)
Deleted row(s) WHERE non_unique_key = 2
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 3, auto_incrementing_id: 3, int_val: 2)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted row(s) WHERE non_unique_key = 3 AND auto_incrementing_id = 3
(non_unique_key: 3, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 4, auto_incrementing_id: 4, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 1, int_val: 0)
(non_unique_key: 1, auto_incrementing_id: 2, int_val: 1)
(non_unique_key: 1, auto_incrementing_id: 3, int_val: 98)
Deleted the table
Done
Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Reviewed-on: http://gerrit.cloudera.org:8080/19874
Tested-by: Kudu Jenkins
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Reviewed-by: Attila Bukor <ab...@apache.org>
(cherry picked from commit 6d48cd6f90e7820fbabd0560139ad48fe9d66a29)
---
A examples/python/basic-python-example/non_unique_primary_key.py
1 file changed, 221 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/20226/2
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
[kudu-CR](branch-1.17.x) KUDU-1945 Add Python example for non-unique PK
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/20226 )
Change subject: KUDU-1945 Add Python example for non-unique PK
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit http://gerrit.cloudera.org:8080/20226
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: I1dd862c4f26b3d79ec268727363fae3426135f52
Gerrit-Change-Number: 20226
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Attila Bukor <ab...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Comment-Date: Thu, 20 Jul 2023 11:30:15 +0000
Gerrit-HasComments: No