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
Special double values on the remaining surfaces: rendering, division, casts, JSON-LD filter atoms, coercion, MEDIAN/VARIANCE/STDDEV #2073
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expected
#2044 makes every xsd:double indexable and gives the special values (INF, -INF, NaN) SPARQL's semantics on every read lane, the fix for #2043. bplatz's review of #2044 found a handful of surfaces outside its diff that still treat them their own way, all pre-existing, and #2044 listed the aggregate one itself.
Two writers render INF and NaN as null: commit detail flakes (fluree-db-api/src/graph_commit_builder.rs) and SHACL validation results' sh:value (fluree-db-api/src/validate.rs), since a non-finite f64 serializes to JSON null.
Double division by zero is an error.op:numeric-divide gives INF, -INF or NaN for doubles, and op:numeric-mod gives NaN.
xsd:boolean(NaN) is unbound; XPath casting gives false.
JSON-LD filter atoms parse numbers their own way. JSON-LD filter s-expression atoms parse numbers with parse::<f64>() (fluree-db-query/src/parse/filter_sexpr.rs), so (> ?v inf) and (= ?v nan) read Rust's spellings as doubles, where fix(index): every xsd:double value is indexable #2044 puts every other surface on the XSD lexical parser.
coerce.rs admits 2^63 as an i64:*d <= i64::MAX as f64 (fluree-db-core/src/coerce.rs) lets 2^63 through and saturates it to i64::MAX, the same off-by-one fix(index): every xsd:double value is indexable #2044 fixes in Hash. The same comparison appears again further down that file, and I'd guess it has the same problem.
A few more spots that spell a special double the Rust way (inf, -inf, NaN) rather than in XSD form. These turned up while finishing #2044. Most of them go through FlakeValue's Display (value.rs:1071), so one fix there may well cover several:
the SHACL report's lexical form for doubles that aren't xsd:double;
sh:pattern input (pattern.rs:16);
SHACL-SPARQL message substitution, and report_text;
UniqueConstraintViolation.value;
the CLI table output (output.rs:316);
Cypher typed properties (cypher_typed.rs:1145).
Separately, JSON-LD results carry INF / NaN as bare strings with no @type, so a client can't tell them apart from the string "INF".
And fwiw, the stale NaN comment in binary_scan.rs from this checklist is fixed in #2044 (835ae88c4).
P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expected
Activity
aaj3f commentedon Oct 12, 2026
A few more spots that spell a special double the Rust way (
inf,-inf,NaN) rather than in XSD form. These turned up while finishing #2044. Most of them go throughFlakeValue'sDisplay(value.rs:1071), so one fix there may well cover several:xsd:double;sh:patterninput (pattern.rs:16);report_text;UniqueConstraintViolation.value;output.rs:316);cypher_typed.rs:1145).Separately, JSON-LD results carry
INF/NaNas bare strings with no@type, so a client can't tell them apart from the string"INF".And fwiw, the stale NaN comment in
binary_scan.rsfrom this checklist is fixed in #2044 (835ae88c4).