Skip to content

Conversation

@asubiotto
Copy link
Contributor

checked_pruning_expr would otherwise return None which would result in no pruning using expressions that contained a CastExpr somewhere. It's relatively common for e.g. struct fields to be cast to the right type for comparison with literals by datafusion, and this expression translates to get_item(cast(struct), "field") = "value". This cast within a get_item would return None when field_path was called before this change.

@asubiotto asubiotto requested a review from a10y November 4, 2025 11:27
@asubiotto asubiotto added the changelog/fix A bug fix label Nov 4, 2025
checked_pruning_expr would otherwise return None which would result in no
pruning using expressions that contained a CastExpr somewhere. It's relatively
common for e.g. struct fields to be cast to the right type for comparison with
literals by datafusion, and this expression translates to
get_item(cast(struct), "field") = "value". This cast within a get_item would
return None when field_path was called before this change.

Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
@asubiotto asubiotto force-pushed the asubiotto/prunecast branch from 82c3db3 to f2547de Compare November 4, 2025 11:30
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.87%. Comparing base (69ef61d) to head (f2547de).
⚠️ Report is 26 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-expr/src/exprs/cast.rs 25.00% 9 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@robert3005 robert3005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's some extra pruning possible with cast expression but that's a more complicated rewrite

@robert3005 robert3005 merged commit 8bd2cbb into develop Nov 4, 2025
40 checks passed
@robert3005 robert3005 deleted the asubiotto/prunecast branch November 4, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants