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 into
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 expose reusable Adds new heap capabilities ( Reviewed by Cursor Bugbot for commit 9047680. Bugbot is set up for automated code reviews on this repo. Configure here. |
Merging this PR will degrade performance by 16.4%
Performance Changes
Comparing |
c484cc9 to
b399240
Compare
deb5f19 to
7d9f781
Compare
b399240 to
966d6c1
Compare
7d9f781 to
08c277c
Compare
966d6c1 to
80d2eaf
Compare
08c277c to
3cb3bf5
Compare
3cb3bf5 to
dd10bcf
Compare
80d2eaf to
6e468bc
Compare
dd10bcf to
ffd9997
Compare
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 ffd9997. Configure here.
89ae7c2 to
9047680
Compare


🌟 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.