Skip to content
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

[FEA] Return null for the row where null exists in starts, or sizes, or steps #10012

Closed
firestarman opened this issue Jan 11, 2022 · 6 comments
Closed
Labels
feature request New feature or request

Comments

@firestarman
Copy link
Contributor

firestarman commented Jan 11, 2022

#9839 has implemented the per-list sequence, but it will blow up when null exists in starts, or sizes, or steps.

Asking to return nulls silently instead (or can choose to return null) for this case is to align with the behavior of Spark. Spark will return nulls for rows that contain at least one null. For example,

start end step sequence(start, end, step)
0 5 1 [0, 1, 2, 3, 4, 5]
null 2 2 null
-3 null 1 null
1 3 null null
null 3 null null
@jrhemstad
Copy link
Contributor

jrhemstad commented Jan 11, 2022

We specifically chose not to emulate this behavior. This behavior can be emulated in the plugin by stripping nulls in the inputs and then ANDing the output with the original input null mask.

@ttnghia
Copy link
Contributor

ttnghia commented Jan 11, 2022

Firstly, you do pre-processing in the plugin, computing the AND bitmask to find the null rows, and setting size = 0 for the rows containing null. By doing so, the corresponding output lists from cudf will be empty list. Then, you do post-processing (also in the plugin), setting null for the corresponding output rows.

@firestarman
Copy link
Contributor Author

Thanks for the info.
Is there any reason not to do this ? I think handling it in plugin is not as easy as in cudf.

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@github-actions
Copy link

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@GregoryKimball
Copy link
Contributor

Closing based on discussion in #9839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants