Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Primitives #368

Open
DavePearce opened this issue Oct 24, 2024 · 0 comments
Open

Simplify Primitives #368

DavePearce opened this issue Oct 24, 2024 · 0 comments

Comments

@DavePearce
Copy link
Collaborator

DavePearce commented Oct 24, 2024

The fundamental primitives currently in schema/constraint and schema/assignment include various things which are not actually primitives. What we want are just the actual fundamental primitives:

  • Data Columns

  • Computed Columns. These apply an arbitrary computation to a given set of source columns, producing a given set of target columns.

  • Lookup Constraints

  • Permutation Constraints

  • Vanishing Constraints

Everything else is really something at a higher level (e.g. a sorting constraint). For example, the lexicographic sorting constraint (over say columns X, Y, Z) is really a vanishing constraint which says this:

X[i-1] < X[i]
|| (X[i-1] == X[i] && Y[i-1] < Y[i]) 
|| (X[i-1] == X[i] && Y[i-1] == Y[i] && Z[i-1] < Z[i])  
|| (X[i-1] == X[i] && Y[i-1] == Y[i] && Z[i-1] == Z[i])

Implementing this naively however, does not result in the same optimised column representation.

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

No branches or pull requests

1 participant