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

Join - shouldn't use new Dictionary<DValue<RecordValue>, bool>(); #2788

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

Join - shouldn't use new Dictionary<DValue<RecordValue>, bool>(); #2788

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

Comments

@MikeStall
Copy link
Contributor

Join shouldn't use
DValue or RecordValue as a dictionary key.

var innerDict = new Dictionary<DValue<RecordValue>, bool>();

Fx does not have language semantics for RecordValue comparison.

Thing 1:
Join / Summarize / Distinct all have this same concept of comparing values. Can they share?

Function How does it compare uniqueness? Comments
Distinct: Use ToObject, but only after a primitive check
Summarize Uses RecordValue.ToExpression. This is probably dangerous. is ToExpression always deterministic?
Join
var innerDict = new Dictionary<DValue<RecordValue>, bool>();
uses DValue as a key.

Can we standardize on Distinct's approach?

Thing 2:
Maybe even Dvalue.Equals should throw? RecordValue.Equals throw?
This is probably a larger breaking change - but would flush out bad usage.

@anderson-joyle anderson-joyle 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

2 participants