fsprojects / FSharp.Linq.ComposableQuery

Compositional Query Framework for F# Queries, based on "A Practical Theory of Language-Integrated Query"
http://fsprojects.github.io/FSharp.Linq.ComposableQuery/
MIT License
67 stars 13 forks source link

Comparison tests failing due to IEnumerable behaviour #2

Open ixtreon opened 10 years ago

ixtreon commented 10 years ago

The default IEnumerable (also: IQueryable, IGrouping) comparer checks for referential rather than structural equality. This causes queries that output records with such elements as values to fail.

To reproduce the issue observe the comparison results of Q17 and Q42. Both queries' return values are tuples containing an IGrouping object which causes them to fail. On the other hand one can verify the result sets are the same by using a debugger.

Fixing this issue would require a custom comparer to check for element-wise equality between objects extending the IEnumerable type. This comparer must also recursively call itself in the case of nested types, such as tuples, lists, arrays or any such other custom type -- which seems infeasible.

ixtreon commented 10 years ago

As this is a minor, documented issue which does not seem to have a straightforward fix, I am marking it with wontfix.