Looks like I don't have access to the underlying type at runtime. I tried checking with
```scala
      if (!partitioner.isInstanceOf[CanonicalRandomVertexCut]) {
        throw new SparkException(partitioner.getClass.getName
          + " is incompatible with groupEdgeTriplets")
      }
```
but this causes a `type <error> in type <error> is unchecked since it is eliminated by erasure`. Ideas?