Fix Ossie logical expressions and aggregate grains in Rust - #403
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f4cd8116b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if kind == Some(DocumentKind::Ontology) && object.contains_key("prefixes") { | ||
| if let Some(profile) = profile.as_mut() { | ||
| profile.schema_revision = Some(CURRENT_SCHEMA_REVISION.to_string()); | ||
| } |
There was a problem hiding this comment.
Detect current ontologies without relying on prefixes
A valid current-schema ontology may omit the optional prefixes property while still using current-only component fields such as iri; this condition then reports the legacy 0.2.0.dev0 profile with no schema_revision. Because the Rust inspection API provides no explicit revision parameter, consumers cannot select the correct current profile for such documents. Detect other current-only structure or expose an explicit schema-revision selection rather than using prefixes as the sole discriminator.
Useful? React with 👍 / 👎.
3f4cd81 to
fc1fe27
Compare
Rust Ossie aggregation could let a physical column shadow a computed logical field or reject a joined-row aggregate. Native Ossie import also discarded complete logical metric semantics. This preserves the same declared-field and aggregate-population contract as the preceding Python layer.
The native importer accepts current flat documents, validates scalar/source expressions and identifiers, and lowers
OSSIE_SQL_2026. Imported typed scopes retain graph metrics and validate parsed dependencies before compilation. Runtime planning keeps independent entity totals separate from joined-row expressions, including extra fanout, compound keys, unmatched facts, constant aggregates, and imported windows.The aggregate helper derives its owner from the source population, eliminating the redundant argument that failed Clippy. Runtime regressions cover same-name computed fields, query/rewrite behavior, mixed formulas, and tuple-grain preservation. Native source validation remains an explicit structural subset; full schema/ontology/archive APIs are shared through Python.
Local validation after the CI fixes: 625 Rust unit tests, 11 native integration/parity-adapter tests, and 16 Rust aggregate regressions passed. Clippy passed across all targets and features with warnings treated as errors; Rustfmt passed. The extension and native adapter were rebuilt from this source before execution checks.