/** A function that generates multiplication table of {@code ncol} columns x
* {@code nrow} rows. */
public static QueryableTable multiplicationTable(final int ncol,
final int nrow, Integer offset) {
final int offs = offset == null ? 0 : offset;
return new AbstractQueryableTable(Object[].class) {
public RelDataType getRowType(RelDataTypeFactory typeFactory) {
final RelDataTypeFactory.FieldInfoBuilder builder =
typeFactory.builder();
builder.add("row_name", typeFactory.createJavaType(String.class));
final RelDataType int_ = typeFactory.createJavaType(int.class);