Skip to content

Conversation

@Matt711
Copy link
Contributor

@Matt711 Matt711 commented Oct 28, 2025

Description

I think what is happening is that during expression decomposition, we sometimes end up with a Cast node whose children are all literals. Those children produce Empty IR, so when _decompose filters them out we end getting an IndexError a few lines down.

This PR makes it so we now reuse the parent’s input IR in that case.

I haven't been able to come up with a smaller repro, but PDS-H Q17, doesn't crash anymore.

$ POLARS_GPU_ENABLE_CUDA_MANAGED_MEMORY=0 python python/cudf_polars/cudf_polars/experimental/benchmarks/pdsh.py --path scale-10 --no-print-results --no-summarize --executor streaming --iterations 1 17
Query 17 - Iteration 0 finished in 2.0463s

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@Matt711 Matt711 requested a review from a team as a code owner October 28, 2025 22:14
@Matt711 Matt711 requested review from bdice and vyasr October 28, 2025 22:14
@Matt711 Matt711 added bug Something isn't working non-breaking Non-breaking change labels Oct 28, 2025
@github-actions github-actions bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Oct 28, 2025
@GPUtester GPUtester moved this to In Progress in cuDF Python Oct 28, 2025
@TomAugspurger
Copy link
Contributor

I haven't been able to come up with a smaller repro, but PDS-H Q17, doesn't crash anymore.

Thanks for looking! I also have been struggling to make a reproducer. I think one of us should try once more to write one and if we're unable to then we can merge this.

@vyasr
Copy link
Contributor

vyasr commented Nov 3, 2025

I haven't reviewed this yet based on Tom's last comment, but please let me know if you decide you can't find a MRE and it is ready for a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cudf-polars Issues specific to cudf-polars non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[BUG]: IndexError in _decompose when running pdsh query 17 with decimal data

3 participants