BE-522: HashQL: Expand stdlib type system with temporal types#8674
BE-522: HashQL: Expand stdlib type system with temporal types#8674indietyp wants to merge 4 commits intobm/be-306-hashql-postgres-translationfrom
Conversation
feat: make Int size aware feat: postgres serialization feat: checkpoint feat: checkpoint feat: checkpoint feat: errors feat: psql codec feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: move bridge -> orchestrator feat: move bridge -> orchestrator feat: organize the runtime a bit more feat: organize the runtime a bit more feat: checkpoint feat: checkpoint feat: checkpoint feat: checkpoint feat: organize the runtime a bit more feat: finish orchestrator first version feat: finish orchestrator first version feat: feat: move out suspension requests to own module chore: clippy feat: split out into more manageable functions feat: split out into more manageable functions chore: orchestrator docs feat: organize the runtime a bit more feat: test orchestrator feat: better symbol repr feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: orchestrator test harness feat: test orchestrator feat: pipeline feat: bless snapshots chore: tests chore: masking chore: tests fix: SSA repair chiore: ssa repair snapshots feat: orchestrator test harness chore: remove spec fix: library features chore: update snapshots chore: update docs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryHigh Risk Overview Refactors stdlib type definitions to be externally constructible: several modules are made Extends allocator utilities by introducing Reviewed by Cursor Bugbot for commit deb5f19. Bugbot is set up for automated code reviews on this repo. Configure here. |
Merging this PR will degrade performance by 27.89%
Performance Changes
Comparing Footnotes |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d82e398. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## bm/be-306-hashql-postgres-translation #8674 +/- ##
=========================================================================
+ Coverage 63.16% 63.19% +0.02%
=========================================================================
Files 1336 1338 +2
Lines 137675 138468 +793
Branches 5551 5557 +6
=========================================================================
+ Hits 86961 87499 +538
- Misses 49794 50047 +253
- Partials 920 922 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
627f81a to
deb5f19
Compare
8b510e5 to
c484cc9
Compare
🤖 Augment PR SummarySummary: Expands HashQL’s stdlib type system with first-class temporal bounds/intervals, and refactors stdlib type exposure so monomorphized type instances can be constructed externally. Changes:
Technical Notes: The PR increases public surface area (modules + 🤖 Was this summary useful? React with 👍 or 👎 |


🌟 What is the purpose of this PR?
This PR expands the HashQL standard library's temporal type system and refactors how standard library types are defined and exposed. The
QueryTemporalAxestype, previously a stub in thegraphmodule, is replaced with a fully-specifiedtemporalmodule containing a rich set of temporal bound and interval types (Timestamp,TemporalBound,Interval,LeftClosedTemporalInterval,RightBoundedTemporalInterval,PinnedTransactionTimeTemporalAxes,PinnedDecisionTimeTemporalAxes,QueryTemporalAxes, etc.). Entity types in the knowledge graph are updated to use real temporal metadata (usingLeftClosedTemporalInterval) instead of opaqueUnknownwrappers.Alongside this, type construction logic is extracted into public
typessubmodules for each standard library module, enabling external consumers to construct monomorphized type instances without going through the full module registration machinery. Several modules are madepubto support this. TheScratchPoolallocator is introduced for multi-threaded bump allocation, andFromIn<&str, A> for Rc<str, A>is implemented. TheRuntimeReprsymbol representation is refactored to useextern "C"unsized types and raw pointer field access to avoid provenance issues.🔗 Related links
🔍 What does this change?
graph::temporalas a new standard library module with a full set of temporal types:Timestamp,DecisionTime,TransactionTime,UnboundedTemporalBound,InclusiveTemporalBound,ExclusiveTemporalBound,TemporalBound,FiniteTemporalBound,OpenTemporalBound,Interval,LeftClosedTemporalInterval,RightBoundedTemporalInterval,PinnedTransactionTimeTemporalAxes,PinnedDecisionTimeTemporalAxes, andQueryTemporalAxes.QueryTemporalAxes(previously an empty opaque struct) fromgraph::Graphand moves it to the newtemporalmodule.entityknowledge types to depend ongraph::temporal::Temporaland useLeftClosedTemporalIntervalforTemporalMetadatainstead of an opaqueUnknownwrapper.typessubmodules forcore::option,core::url,core::uuid,graph::temporal,graph::types::ontology,graph::types::principal::actor_group,graph::types::principal::actor_group::web, andgraph::types::knowledge::entity, each accepting optional dependency structs for injection.std_lib,std_lib::core,std_lib::graph,graph::types,graph::types::knowledge,graph::types::ontology,graph::types::principal,graph::types::principal::actor_group,graph::types::principal::actor_group::web,graph::temporal,module::std_lib, andmodule::std_lib::core::option/url/uuidpublic.ScratchPoolandScratchPoolGuardto the heap module, providing aSync-capable pool of bump allocators backed bybump_scope::BumpPool.FromIn<&str, A> for Rc<str, A>with tests covering unicode, empty strings, and clone sharing.RuntimeReprto use anextern "C"unsizedUnsizetype and raw pointer field access (&raw const/mut) to avoid provenance narrowing issues, replacingstr_from_raw_partswithstr::from_utf8_uncheckedandget_mut_unchecked/extern_typesnightly features.sym::constants throughout, eliminating mostheap.intern_symbol("...")calls.symsymbol table, including type names, field names, and fully-qualified path symbols for all new and existing types.🛡 What tests cover this?
FromIn<&str, A> for Rc<str, A>: basic conversion, unicode, empty string, and clone pointer equality.❓ How to test this?
cargo test -p hashql-coreand confirm all tests pass.temporalmodule types are accessible and correctly structured via the standard library manifest.