Repository navigation
Description
Status (2026-11-23): every item is fixed on next or moved; #2494 fixes the last one. The float item moved to #1776.
Some values are stored with less detail than they're written with: an integer beyond 64 bits keeps no XSD subtype in the index (#2027), and a dateTime or time is stored to the microsecond. Storage tells such values apart by index key, while novelty's set-semantics dedup (fact_state) tells them apart by term, so writes and reads around them don't agree on when two facts are the same. #2008 left these as follow-ups, and upsert.md documents the first one as the exception to idempotent upserts.
- An identical re-upsert or re-sync can remove such a value. Once it's indexed (a temporal: once the ledger is reloaded from its commits), restating it retracts the stored decode and asserts the written term under one key, and storage can resolve that pair as the retraction.
maindid the same before fix(transact): retractions name stored facts; RDF text is parsed once #2008. Fixed by fix(transact): write fidelity, part 2 — one fact identity, microsecond temporals, value reads #2109. - A
dateTimeortimepast the microsecond is held as written by the process that wrote it, and with six digits once the ledger is reloaded or indexed. So aDELETE DATAnaming it as written commits nothing after a restart, and a query constant written past the microsecond doesn't match the stored value. One direction is reading everydateTime/timeto the microsecond wherever it's written or queried, with an ordering against a constant past the microsecond still counting every digit of it. Fixed by fix(transact): write fidelity, part 2 — one fact identity, microsecond temporals, value reads #2109: held to the microsecond wherever it is read, query constants included, for equality and ordering alike. - Make novelty's dedup key-aware.
fact_statededups by term and the index merges by key; bplatz's follow-up on fix(transact): retractions name stored facts; RDF text is parsed once #2008 (007aa2983) handled one instance of the split (an index row is dropped when a novelty op has its key). It's also why pre-index reads can show two subtypes of one big integer side by side (an insert of a second subtype while the first is in novelty) until the next index build merges them. Resolved onnext: fix(transact): write fidelity, part 2 — one fact identity, microsecond temporals, value reads #2109 gave writes one fact identity, and since feat(index)!: integers too large for 64 bits keep their declared XSD subtype #2477 the index key carries a big integer's subtype, sofact_state's term and the index key agree for every kind. Only a v4 index served before its first v5 build still merges subtypes, and that build is always a full rebuild. - The index keeps no XSD subtype for an integer beyond 64 bits. That's Indexed overflow integers lose their xsd integer subtype (unsignedLong, nonNegativeInteger, …) #2027, and keeping it is an index-format change, so
next. The alternative is normalizing such values where they're written, which changes what a write stores. Needs a decision between the two. Fixed onnextby feat(index)!: integers too large for 64 bits keep their declared XSD subtype #2477 (closes Indexed overflow integers lose their xsd integer subtype (unsignedLong, nonNegativeInteger, …) #2027): the index keeps the subtype. -
BINDgives onexsd:integerwhatever the subtype of a big integer it binds, so on a novelty-only ledger a DELETE row whose value a BIND bound doesn't name a big integer stored under a subtype. (fix(query): indexed overflow integers keep xsd:integer through DATATYPE, DISTINCT, GRAPH and ORDER BY #2012 fixed the SELECT half: an indexed big integer no longer reads back asxsd:decimal.) Fixed onnextby feat(index)!: integers too large for 64 bits keep their declared XSD subtype #2477 (BIND drops a big integer's declared XSD subtype #2058). - After indexing,
-0.0loses its sign and"1.50"reads back as1.5(onmaintoo). Worth re-checking-0.0once fix(index): every xsd:double value is indexable #2044 lands, since it treats-0.0as0for DISTINCT and grouping; the decimal one sits close to Numeric lexical forms are canonicalized at ingest, so01,+1and1become the same term (decision D-11) #1696's lexical-form decision. fix(core)!: a number is stored as its value, and an xsd:float at single precision #2494: Numeric lexical forms are canonicalized at ingest, so01,+1and1become the same term (decision D-11) #1696 is decided as a documented deviation (a number is its value), and a decimal and a double are now read as the index stores them wherever they are written or queried, so they read the same before and after indexing. -
xsd:floatis stored at double precision, so"3.4e39"^^xsd:floatkeeps its double value instead of mapping toINF(from fix(index): every xsd:double value is indexable #2044; Float rendering keys on theDoublevariant, not the declaredxsd:floatdatatype — one term, three spellings #1776 is the umbrella for the same root). Rounding every float literal changes stored values and equality, so it needs a decision too, including whether it runs on existing data without a migration. Moved to Float rendering keys on theDoublevariant, not the declaredxsd:floatdatatype — one term, three spellings #1776, which owns the float decision.
Related existing issue: #2027 (attached here as a sub-issue); #1776 and #1696 sit next to it.
From #2008 (Follow-ups: values stored with less detail than written; query-side datatype fidelity for big integers), its review (sub-microsecond temporals; novelty's dedup) and #2044 (Follow-ups: xsd:float single precision).
Activity