I do not changed this code. I believe that it's an attempt to achieve a
better performance.  I can use your proposal -is definitely more elegant.

In src/main/scala/scala/slick/memory/QueryInterpreter.scala:

>          val leftV = run(left).asInstanceOf[Coll]
>          val rightV = run(right).asInstanceOf[Coll]
> -        if(all) leftV ++ rightV
> -        else leftV ++ {
> -          val s = leftV.toSet
> -          rightV.filter(e => !s.contains(e))
> +        if(Library.UnionAll == operator) {
> +          leftV ++ rightV
> +        }
> +        else if(Library.Union == operator) {
> +          leftV ++ {
> +            val s = leftV.toSet
> +            rightV.filter(e => !s.contains(e))
> +          }

why not (leftV ++ rightV).toSet ?

—
Reply to this email directly or view it on GitHub.