Skip to content

Load and query Ossie models directly in DuckDB - #502

Open
nicosuave wants to merge 4 commits into
mainfrom
codex/duckdb-ossie-files
Open

nicosuave wants to merge 4 commits into
mainfrom
codex/duckdb-ossie-files

Conversation

@nicosuave

@nicosuave nicosuave commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Load wrapped Ossie 0.1.1 and the flat 0.3.0.dev0 logical draft directly into a persistent DuckDB semantic catalog. The native draft importer validates against Apache revision d27a6be and retains dataset measure ownership across reopen.

Ordinary SELECT can query global metrics through FROM metrics. Physical tables and CTEs keep their existing name resolution. Acceptance cases load the unchanged upstream TPC-DS files, exercise joins, filters, cross-dataset metrics and scoped measures, and repeat the queries after a read-only reopen.

The draft requires named windowed model metrics to return E_DEFERRED_WINDOWED_METRIC. The extension guide includes runnable SQL for cumulative sales, brand rank within each store, and monthly sales change using the model's total_sales metric.

@nicosuave
nicosuave added this pull request to stack #503 November 24, 2026 19:22
@nicosuave nicosuave changed the title codex/duckdb ossie files Load and query Ossie models directly in DuckDB Nov 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T19:25:23.458959Z 5b262d9 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b262d98cc

ℹ️ 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".

Comment on lines +1427 to 1429
if self.graph.has_strict_metric_scope() || aggregate_plan::is_osi_model_calculation(metric)
{
return self.strict_graph_metric_owners(reference, metric, visiting);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve ownership for column-free OSI calculations

For a wrapped 0.1.1 model containing a single dataset and a metric such as COUNT(*) + 1, this new strict-owner path rejects a previously executable query with metric.graph_scope.<name>. The OSI reader imports that expression as a derived metric with sql_is_complete = false, so logical_constant_owner() cannot supply its population; the aggregate planner also cannot bind the column-free count and falls back here. Previously, the non-strict path inferred the sole model as owner. Preserve that unambiguous single-dataset fallback for these imported calculations.

Useful? React with 👍 / 👎.

Base automatically changed from codex/duckdb-release-support to main November 25, 2026 01:54
@nicosuave
nicosuave force-pushed the codex/duckdb-ossie-files branch from 5b262d9 to 50016a3 Compare November 25, 2026 01:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant