You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add _numeric_sentinel_eligible(dtype) to utils/_null_detection.py — a pure dtype predicate that returns True for all integer and float numeric Polars dtypes and False for everything else.
This becomes the single authority for which columns are eligible to receive user-declared numeric sentinel normalization, mirroring the existing _sentinel_eligible (string) and _inf_eligible (float NaN/Inf) functions already in the same module.
Acceptance criteria
_numeric_sentinel_eligible is defined in utils/_null_detection.py alongside the existing _sentinel_eligible and _inf_eligible functions
Returns True for all Polars integer dtypes (Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64)
Returns True for Float32 and Float64
Returns False for String/Utf8, Boolean, Date, Datetime, Duration, and any other non-numeric dtype
Unit tests added to tests/unit/profiling/test_null_detection.py covering all dtype cases above
Docstring follows the numpy-style convention required by ADR-0034
Parent
#94
What to build
Add
_numeric_sentinel_eligible(dtype)toutils/_null_detection.py— a pure dtype predicate that returnsTruefor all integer and float numeric Polars dtypes andFalsefor everything else.This becomes the single authority for which columns are eligible to receive user-declared numeric sentinel normalization, mirroring the existing
_sentinel_eligible(string) and_inf_eligible(float NaN/Inf) functions already in the same module.Acceptance criteria
_numeric_sentinel_eligibleis defined inutils/_null_detection.pyalongside the existing_sentinel_eligibleand_inf_eligiblefunctionsTruefor all Polars integer dtypes (Int8,Int16,Int32,Int64,UInt8,UInt16,UInt32,UInt64)TrueforFloat32andFloat64FalseforString/Utf8,Boolean,Date,Datetime,Duration, and any other non-numeric dtypetests/unit/profiling/test_null_detection.pycovering all dtype cases aboveBlocked by
None — can start immediately