-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange ds/head and ds/tail behaviour in v7 #343
Comments
And maybe a better example of the issue:
|
That is the error I get - index out of bounds - it was because the head/tail operations put print-index-range metadata on the returned dataset and the select-rows operation didn't clear the metadata (which in general it should not). So when you go to print the third, 2 row dataset it has print-index-range of (range 5) from the head operation :-). |
The fix is really two-fold. First, select-rows should clear specifically print-index-range. Second, printing itself should never cause that exception so it needs to always filter print-index-range to be in the range of the current dataset row indexes. One thing you may really like - select-rows now accepts negative indexes which will index from the end python-style. |
New release is up :-) |
thanks!! |
Wow! Nice! |
Hi Chris,
some weird behaviour with these functions in v7, see below:
Also note the docstring for
ds/head
andds/tail
is wrong as it says "Get the first n row of a dataset. Equivalent to `(select-rows ds (range n)). Arguments are reversed, however, so this can be used in ->> operators." (the arguments are not reversed, and it's better that way IMHO!)Thanks,
The text was updated successfully, but these errors were encountered: