-
Notifications
You must be signed in to change notification settings - Fork 915
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
Implement per-list sequence #9839
Conversation
rerun tests |
Hi @ttnghia Looks like when size has some negative values, the sequences result will have some issues. ColumnVector start = ColumnVector.fromBoxedInts(1, 2, 3, 4, 5, 6);
ColumnVector size = ColumnVector.fromBoxedInts(2, 7, -4, 2, 5, 2); sequences(start, size) will get below result, the second row is not correct 1 2
2 3 4 4 5 5 6
null
4 5
5 6 7 8 9
6 7 |
BTW, When I tested the sequences with float start and float-step. The result returned from CUDF seems to be INT32 type and the result seems not correct. float[] x = {1.2f, 2.2f, 3.3f};
Integer[] sizeV = new Integer[]{1, 2, 3};
ColumnVector start = ColumnVector.fromFloats(x);
ColumnVector size = ColumnVector.fromBoxedInts(sizeV);
ColumnVector step = ColumnVector.fromFloats(x); The output is like that 1 2
2 3 4 5 6 7 8
3 4 5 6
4 5
5 6 7 8 9
6 7 |
Yes, the API explicitly says that "if the input size is negative then output is undefined". Thus, the caller must pass in |
Sorry I can't reproduce your issue. I ran your example and get this:
So maybe something else is wrong with your test? |
Okay, Got it. Thx for the explanation |
Sorry, it turned out my test was wrong. |
This comment has been minimized.
This comment has been minimized.
@gpucibot merge |
This PR adds
lists::sequences
API, allowing to generate per-list sequence. In particular, it allows generating a lists column in which each list is a sequence of numbers/durations. These sequences are generated individually from separate sets of (start, step, size) input values.Closes #9424.
Note:
lists::sequences
supports only numeric types (integer types + floating-point types) and duration types.