Skip to content

Commit a49661a

Browse files
mhallidaclaude
andcommitted
fix: altimate_core_column_lineage uses full depth for CTE tracing
Pass depth="full" to core.columnLineage() to enable multi-hop CTE lineage tracing. Previously the depth parameter was omitted, potentially causing the engine to only trace direct edges and miss columns flowing through CTE chains (e.g., users.id → active_users CTE → output). Fixes TICKET-014 in #422. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent a36e9a8 commit a49661a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/opencode/src/altimate/native/altimate-core.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,17 @@ register("altimate_core.resolve_term", async (params) => {
608608
}
609609
})
610610

611-
// 20. altimate_core.column_lineage
611+
// 20. altimate_core.column_lineage — with full depth for CTE tracing
612612
register("altimate_core.column_lineage", async (params) => {
613613
try {
614614
const schema = resolveSchema(params.schema_path, params.schema_context)
615615
const raw = core.columnLineage(
616616
params.sql,
617617
params.dialect || undefined,
618618
schema ?? undefined,
619+
params.default_database ?? undefined,
620+
params.default_schema ?? undefined,
621+
"full", // Ensure full depth for multi-hop CTE lineage tracing
619622
)
620623
return ok(true, toData(raw))
621624
} catch (e) {

0 commit comments

Comments
 (0)