Repository navigation
fix(gfql): require explicit epoch-ms comparisons - #2197
Merged
Merged
Conversation
lmeyerov
force-pushed
the
fix/gfql-json-epoch-compat
branch
5 times, most recently
from
October 14, 2026 16:02
97b258b to
3328369
Compare
lmeyerov
force-pushed
the
fix/gfql-json-epoch-compat
branch
9 times, most recently
from
October 15, 2026 11:04
86c7606 to
286f0f2
Compare
A bare numeric bound is never implicitly an instant: comparison predicates and
Between raise a structured E302 against datetime columns. Explicit UTC epoch
instants are typed datetime values: DateTimeValue.from_epoch(count, unit='s'|'ms')
on the Python side and {"type":"datetime","value":<count>,"unit":"s"|"ms"} on the
wire, with required unit, JSON-safe range on wire numerics, exact integral-float
handling, representability checks, and canonical ISO-UTC serialization. The
unreleased epoch_ms predicate flag is removed everywhere (API, wire, docs) and
rejected clearly on decode. Polars gains native DateTimeValue comparison lowering
(exact integer-epoch bounds at column resolution, naive-UTC instant semantics,
honest declines for unrepresentable bounds).
lmeyerov
force-pushed
the
fix/gfql-json-epoch-compat
branch
from
October 15, 2026 11:45
286f0f2 to
b557280
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GFQLSchemaError(E302).DateTimeValuemodel:DateTimeValue.from_epoch(value, *, unit), whereunitis required and must be"s"or"ms".{"type":"datetime","value":<integer>,"unit":"s"|"ms"}.epoch_mspayloads as unsupported E201; there is no predicate-level epoch flag, legacy alias, default unit, or separate epoch value class.Evidence
Review round R1-R3 is resolved: Polars no longer narrows wide bounds through nanoseconds; invalid epoch representations return structured E201; NumPy extended-precision values are validated before narrowing. At the exact head below, the adapted regressions and positive controls pass 63/63 on both DGX cuDF lanes.
Exact head:
b557280e96bbf58095d442a9517e27afb23b05d6Exact tree:
a7c11dece5f65950028b205bc519535938e32b31Base:
master@0c71cc4bb8281ecc1f07de8657c4ec45c737a5c1CPU / Polars at the exact head:
DGX cuDF at the exact head:
Coverage includes all six comparisons plus
Between, mixed s/ms bounds, Python and JSON entrances, semantic round-trips, epoch zero/negative values, invalid inputs, exact-ms boundaries against finer-resolution columns, timezone/naive and DST cases, empty/all-null frames, genuine no-match controls, numeric-column controls, and existing ISO compatibility.Notes