It turned out using Relation#eql? (which is based on dataset and name) is actually broken. First of all Relation::Name is equalized only on relation and dataset attributes, so if there's an alias involved, it will not work. It was too risky to fix it now because it's possible there's some code that relies on this equality behavior. It is something to address in 6.0.0. I fixed it anyway in #563
There's also another risk - equalizing on Relation#datasetmay result in materialization of the dataset. I remember it happened in some cases in the past, that's why it was much better to use Relation::Name#key to figure out which nodes are duplicated. In theory, you can have more than one node with the same key but different datasets, but you would have to do this manually.
@joelvh - I reckon this should fix your problems
@v-kolesnikov - there's a big chance this will fix your problems too
Refs #548
It turned out using
Relation#eql?
(which is based ondataset
andname
) is actually broken. First of allRelation::Name
is equalized only onrelation
anddataset
attributes, so if there's an alias involved, it will not work.It was too risky to fix it now because it's possible there's some code that relies on this equality behavior. It is something to address in 6.0.0.I fixed it anyway in #563There's also another risk - equalizing on
Relation#dataset
may result in materialization of the dataset. I remember it happened in some cases in the past, that's why it was much better to useRelation::Name#key
to figure out which nodes are duplicated. In theory, you can have more than one node with the same key but different datasets, but you would have to do this manually.@joelvh - I reckon this should fix your problems
@v-kolesnikov - there's a big chance this will fix your problems too