invenia / AxisSets.jl

Consistent operations over a collection of KeyedArrays
MIT License
5 stars 0 forks source link

Multi-value wildcard doesn't work when dimpaths contain repeated names #43

Open morris25 opened 3 years ago

morris25 commented 3 years ago

A filtered dataset had inconsistent constrained values across tables. The problem turned out to be that the constraint ignored one of the tables because it was using a multi-value wildcard. Switching to a single-value wildcard fixed it.

julia> using AxisSets: Pattern

julia> (:x, :a, :a) in Pattern(:x, :a, :a)
true

julia> (:x, :a, :a) in Pattern(:x, :_, :a)
true

julia> (:x, :a, :a) in Pattern(:x, :__, :a)
false

julia> (:x, :a, :a) in Pattern(:__, :a)
false