fix(deps): restore np.nan in offset_metrics_df empty branch#41267
fix(deps): restore np.nan in offset_metrics_df empty branch#41267eschutho wants to merge 1 commit into
Conversation
PR apache#40421 accidentally reverted the np.NaN→np.nan fix from apache#41118. np.NaN was deprecated in NumPy 1.20 and removed in NumPy 2.0; this restores the correct lowercase alias. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review Agent Run #87597cActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41267 +/- ##
==========================================
- Coverage 64.36% 64.36% -0.01%
==========================================
Files 2653 2653
Lines 144867 144867
Branches 33421 33421
==========================================
- Hits 93250 93245 -5
- Misses 49946 49949 +3
- Partials 1671 1673 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What was the problem?
PR #40421 (
fix(sql): broaden mutating-statement detection) accidentally reverted thenp.NaN → np.nanfix from PR #41118, reintroducing the deprecated alias inExploreMixin.join_offset_dfs():np.NaNwas deprecated in NumPy 1.20 and removed in NumPy 2.0. The canonical spelling isnp.nan.Source: production Datadog logs showing
DeprecationWarning: \np.NaN` was a deprecated alias`.What changed?
Single-line fix:
np.NaN→np.nanatsuperset/models/helpers.py:1982.No behavior change — both are
float('nan')/ IEEE 754 NaN.np.nanis the correct, forward-compatible alias.No-behavior-change note
np.nanandnp.NaNare semantically identical on NumPy < 2.0. On NumPy ≥ 2.0,np.NaNraisesAttributeError; this fix is strictly an improvement.Test plan
grep -rn 'np\.NaN' superset/ --include='*.py'→ zero results (no other occurrences in production code)