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
{{ message }}
Repository navigation
Compare truncates a fractional operand on an integer column (x >= 1.5 matches x = 1) #701
Compare.values (reader/src/main/java/io/github/dfa1/vortex/reader/compute/Compare.java) compares integer columns as longs: Long.compare(na.longValue(), nb.longValue()), or Long.compareUnsigned for unsigned columns. When the predicate operand is fractional, longValue() truncates it. So on an I64 column, x >= 1.5 compares against 1, and a row with x = 1 matches when it should not.
Affects Double, Float and BigDecimal operands on any integer column (signed or unsigned).
To check first: whether Calcite casts or rounds the literal before it reaches Compare, which would hide the bug on the SQL path. The direct ScanFilter API would still hit it.
Fix direction: on an integer column, compare a fractional operand by value (or fold it into an integer bound per operator, e.g. x >= 1.5 becomes x >= 2), and look up what Rust does with a mismatched scalar (coerce or reject). Pin it with a filtered-scan test against vortex-jni.
Activity
fix(reader): a float or decimal operand on an integer column fails in…