@Udtf
  public <T> List<List<T>> cube(final List<T> columns) {
    if (columns == null) {
      return Collections.emptyList();
    }
    return createAllCombinations(columns);
  }
@Test
  public void shouldCubeColumnsWithDifferentTypes() {
    // Given:
    final Object[] args = {1, "foo"};

    // When:
    final List<List<Object>> result = cubeUdtf.cube(Arrays.asList(args));

    // Then:
    assertThat(result.size(), is(4));
    assertThat(result.get(0), is(Arrays.asList(null, null)));
    assertThat(result.get(1), is(Arrays.asList(null, "foo")));
    assertThat(result.get(2), is(Arrays.asList(1, null)));
    assertThat(result.get(3), is(Arrays.asList(1, "foo")));
  }