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

cleanup TableDelegationInfo #2789

Open
MikeStall opened this issue Dec 18, 2024 · 0 comments
Open

cleanup TableDelegationInfo #2789

MikeStall opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@MikeStall
Copy link
Contributor

Some improvements to:
https://github.com/microsoft/Power-Fx/blob/main/src/libraries/Microsoft.PowerFx.Core/Entities/External/TableDelegationInfo.cs

This describes what abilities a RecordType can delegate.

Principles:

  1. Specify what's allowed; not what's restricted. Delegation needs to know exactly what is happening, and so should fail if there's anything it doesn't recognize. Restricted is unsound because we can't assume "anything is delegable except what we exclude" because we don't know what "anything" might include. That's like saying "infinity minus 5".
  2. shrink surface - only public properties for things that are intrinsically necessary and we actually use in our C# delegation logic.
  3. Conceptually - this is like an extension to RecordType. 5. deferred - don't have a single giant poco (that won't scale to a 300 column table).
  4. Use virtuals for GetColumns, etc.
  5. Avoid redundancy. Don't have both a property and virtual for same thing.

Current impl does 3&4, but should be updated for 1&2.

@MikeStall MikeStall self-assigned this Dec 18, 2024
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