@Test
    public void testGeneralJoin() {
        assertEquals(Tensor.from("tensor(x[],y[]):{ {x:0,y:0}:1, {x:1,y:0}:2, {x:2,y:0}:3 }"),
                     Tensor.from("tensor(x[]):{ {x:0}:2, {x:1}:4, {x:2}:6 }")
                                 .divide(Tensor.from("tensor(y[]):{{y:0}:2}")));

        assertEquals(Tensor.from("tensor(x[],y[],z[]):{ {x:0,y:0,z:0}:3, {x:1,y:0,z:0}:4, {x:0,y:1,z:0}:5, {x:1,y:1,z:0}:6 }"),
                     Tensor.from("tensor(x[],y[]):{ {x:0,y:0}:6, {x:1,y:0}:8, {x:0,y:1}:20, {x:1,y:1}:24 }")
                             .divide(Tensor.from("tensor(y[],z[]):{ {y:0,z:0}:2, {y:1,z:0}:4, {y:2,z:0}:6 }")));
    }
Test the indexed subspace join optimization
vespajlib/src/test/java/com/yahoo/tensor/functions/JoinTestCase.java