alamb commented on code in PR #1215:
URL:
https://github.com/apache/datafusion-python/pull/1215#discussion_r2322751837
##########
python/tests/test_functions.py:
##########
@@ -494,6 +494,26 @@ def py_flatten(arr):
lambda col: f.list_slice(col, literal(-1), literal(2)),
lambda data: [arr[-1:2] for arr in data],
),
+ (
+ lambda col: col[:3],
+ lambda data: [arr[:3] for arr in data],
+ ),
+ (
+ lambda col: col[1:3],
+ lambda data: [arr[1:3] for arr in data],
+ ),
+ (
+ lambda col: col[1:4:2],
+ lambda data: [arr[1:4:2] for arr in data],
+ ),
+ (
+ lambda col: col[literal(1) : literal(4)],
+ lambda data: [arr[1:4] for arr in data],
+ ),
+ (
+ lambda col: col[literal(1) : literal(4) : literal(2)],
+ lambda data: [arr[1:4:2] for arr in data],
Review Comment:
should we also test non literal expressions? Even if they are supposed to
error?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]