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

Reduction append functions return index not boolean #1180

Merged
merged 1 commit into from
Feb 13, 2023
Merged

Reduction append functions return index not boolean #1180

merged 1 commit into from
Feb 13, 2023

Conversation

ianthomas23
Copy link
Member

Recently the various Reduction._append functions were changed to return a boolean to indicate if they have performed any modification to their agg. This was to support the new where reductions that need to know if their selector reduction has modified anything so that they can propagate this to their own agg containing e.g. row index. Boolean was fine for that, but with the plan to introduce new 3D aggs such as max_n then a boolean is not sufficient as it needs to be the index of change in the final dimension.

This PR just changes the return from a boolean to an integer index, to confirm that it does not break anything in CI. True is changed to 0, meaning index of 0 in the 3rd agg dimension, and False to -1 meaning no change has occurred.

@ianthomas23 ianthomas23 added this to the v0.14.5 milestone Feb 10, 2023
@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #1180 (4d6e06c) into main (d8167b4) will not change coverage.
The diff coverage is 67.69%.

@@           Coverage Diff           @@
##             main    #1180   +/-   ##
=======================================
  Coverage   85.38%   85.38%           
=======================================
  Files          35       35           
  Lines        8011     8011           
=======================================
  Hits         6840     6840           
  Misses       1171     1171           
Impacted Files Coverage Δ
datashader/reductions.py 85.99% <67.18%> (ø)
datashader/compiler.py 95.62% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ianthomas23
Copy link
Member Author

Merging as this passes CI (except for the usual codecov not dealing with CUDA code) and I need it to build on top of.

@ianthomas23 ianthomas23 merged commit 198c0b4 into holoviz:main Feb 13, 2023
@ianthomas23 ianthomas23 deleted the append_return_index branch February 13, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant