Skip to content

[FPv2: Foundation] Define semantic inputs and metadata exclusions - #2750

Merged
philipfweiss merged 4 commits into
mainfrom
fingerprint-v2-semantic-inputs
Nov 25, 2026
Merged

philipfweiss merged 4 commits into
mainfrom
fingerprint-v2-semantic-inputs

Conversation

@philipfweiss

@philipfweiss philipfweiss commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Foundation PR for fingerprints v2:

Editing a column's description can currently change downstream fingerprints even though the data is unchanged.

This PR defines which node fields fingerprints v2 will use. Descriptions, display names, tags, ownership, and custom metadata are excluded. Fields such as column types, source tables, join rules, and default filters remain inputs.

Later PRs will use these rules when calculating fingerprints.

@philipfweiss
philipfweiss force-pushed the fingerprint-v2-semantic-inputs branch from 93d9903 to ad924b9 Compare November 19, 2026 19:05
@philipfweiss philipfweiss changed the title [2/10] Define semantic inputs for fingerprint v2 [FPv2: Foundation] Define semantic inputs and metadata exclusions Nov 23, 2026
@philipfweiss
philipfweiss marked this pull request as ready for review November 23, 2026 20:10
@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no new actionable issues were found.

Summary

Defines local inputs for v2 fingerprints without changing the active fingerprint engine.

  • Fingerprint v2 now has a defined set of fields for each node.

No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Format semantic contract tests for CI" · Reviewed by Greptile

@philipfweiss
philipfweiss force-pushed the fingerprint-v2-semantic-inputs branch 2 times, most recently from 2efee0b to bffc827 Compare November 23, 2026 20:54
Comment on lines +129 to +131
required_dimensions=sorted(spec.rendered_required_dimensions),
fixed_grain=(
sorted(spec.rendered_fixed_grain)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For the sake of correctness let's do sorted(set(...)) here, instead of just sorted(...).

Also, let's use canonical_required_dimensions here instead of rendered_required_dimensions. Otherwise if we have:

SELECT SUM(id) FROM ns.source

Then these would have different fingerprints though semantically they are the same:

  • required_dimensions = ["id"]
  • required_dimensions = ["ns.source.id"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similarly, for fixed_grain we should use normalize_fixed_grain(spec.rendered_fixed_grain).

@philipfweiss philipfweiss Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed on deduping and using normalize_fixed_grain.

I’m not so sure I agree on using canonical_required_dimensions as-is. Let’s take the following case:

SELECT SUM(o.amount)
FROM ns.orders o
JOIN ns.customers c ON o.customer_id = c.id

In this example, required_dimensions = ["ns.orders.id"] and ["ns.customers.id"] both normalize to ["id"]. But grouping by order ID versus customer ID can produce different results, so those should remain distinct in the fingerprint.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think actually we can just limit the normalization to unambiguous cases for noise reduction

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, fixed by deduping required dimensions and using normalize_fixed_grain.

I limited name normalization to simple queries with one table, so id and ns.source.id match there, while orders.id and customers.id stay distinct in the join example.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, you're right about canonical_required_dimensions! I didn't think of that.

@philipfweiss
philipfweiss force-pushed the fingerprint-v2-semantic-inputs branch from e114164 to 2b2ca79 Compare November 24, 2026 17:42
@philipfweiss
philipfweiss force-pushed the fingerprint-v2-semantic-inputs branch from 2b2ca79 to f50b1d2 Compare November 24, 2026 20:33
@philipfweiss
philipfweiss force-pushed the fingerprint-components branch from ebf1e07 to ced5526 Compare November 24, 2026 21:10
Base automatically changed from fingerprint-components to main November 25, 2026 17:18
@philipfweiss
philipfweiss force-pushed the fingerprint-v2-semantic-inputs branch from f50b1d2 to 8e12c9d Compare November 25, 2026 17:19
@netlify

netlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 8e12c9d
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6b0718b782aad61bfff2acff

@philipfweiss
philipfweiss merged commit f25a0b0 into main Nov 25, 2026
27 checks passed
@philipfweiss
philipfweiss deleted the fingerprint-v2-semantic-inputs branch November 25, 2026 18:29
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.

2 participants