Code review comment: Sorry, I missed this test.

Code before review:
private Object[] generateValues(LogicalType type) {
Random rnd = new Random();
int seedNum = RECORD_NUM / 5;
Object[] seeds = new Object[seedNum];
seeds[0] = null;
seeds[1] = value1(type, rnd);
seeds[2] = value2(type, rnd);
seeds[3] = value3(type, rnd);
for (int i = 4; i < seeds.length; i++) {
switch (type.getTypeRoot()) {
case BOOLEAN:
seeds[i] = rnd.nextBoolean();
break;
case TINYINT:
seeds[i] = (byte) rnd.nextLong();
break;
case SMALLINT:
seeds[i] = (short) rnd.nextLong();
break;
case INTEGER:
seeds[i] = rnd.nextInt();
break;
case BIGINT:
seeds[i] = rnd.nextLong();
break;
case FLOAT:
seeds[i] = rnd.nextFloat() * rnd.nextLong();
break;
case DOUBLE:
seeds[i] = rnd.nextDouble() * rnd.nextLong();
break;
case VARCHAR:
seeds[i] = BinaryString.fromString(RandomStringUtils.random(rnd.nextInt(20)));
break;
case DECIMAL:
DecimalType decimalType = (DecimalType) type;
BigDecimal decimal = new BigDecimal(
rnd.nextInt()).divide(
new BigDecimal(ThreadLocalRandom.current().nextInt(1, 256)),
ThreadLocalRandom.current().nextInt(1, 30), BigDecimal.ROUND_HALF_EVEN);
seeds[i] = Decimal.fromBigDecimal(decimal, decimalType.getPrecision(), decimalType.getScale());
break;
case ARRAY:
case VARBINARY:
byte[] bytes = new byte[rnd.nextInt(16) + 1];
rnd.nextBytes(bytes);
seeds[i] = type instanceof VarBinaryType ? bytes : BinaryArray.fromPrimitiveArray(bytes);
break;
case ROW:
RowType rowType = (RowType) type;
if (rowType.getFields().get(0).getType().getTypeRoot() == INTEGER) {
seeds[i] = GenericRow.of(rnd.nextInt());
} else {
seeds[i] = GenericRow.of(GenericRow.of(rnd.nextInt()));
}
break;
case ANY:
seeds[i] = new BinaryGeneric<>(rnd.nextInt());
break;
default:
throw new RuntimeException("Not support!");
}
}
Object[] results = new Object[RECORD_NUM];
for (int i = 0; i < RECORD_NUM; i++) {
results[i] = seeds[rnd.nextInt(seedNum)];
}
return results;
}

Line under review: throw new RuntimeException("Not support!");

Code after addressing the review:
private Object[] generateValues(LogicalType type) {
Random rnd = new Random();
int seedNum = RECORD_NUM / 5;
Object[] seeds = new Object[seedNum];
seeds[0] = null;
seeds[1] = value1(type, rnd);
seeds[2] = value2(type, rnd);
seeds[3] = value3(type, rnd);
for (int i = 4; i < seeds.length; i++) {
switch (type.getTypeRoot()) {
case BOOLEAN:
seeds[i] = rnd.nextBoolean();
break;
case TINYINT:
seeds[i] = (byte) rnd.nextLong();
break;
case SMALLINT:
seeds[i] = (short) rnd.nextLong();
break;
case INTEGER:
seeds[i] = rnd.nextInt();
break;
case BIGINT:
seeds[i] = rnd.nextLong();
break;
case FLOAT:
seeds[i] = rnd.nextFloat() * rnd.nextLong();
break;
case DOUBLE:
seeds[i] = rnd.nextDouble() * rnd.nextLong();
break;
case VARCHAR:
seeds[i] = BinaryString.fromString(RandomStringUtils.random(rnd.nextInt(20)));
break;
case DECIMAL:
DecimalType decimalType = (DecimalType) type;
BigDecimal decimal = new BigDecimal(
rnd.nextInt()).divide(
new BigDecimal(ThreadLocalRandom.current().nextInt(1, 256)),
ThreadLocalRandom.current().nextInt(1, 30), BigDecimal.ROUND_HALF_EVEN);
seeds[i] = Decimal.fromBigDecimal(decimal, decimalType.getPrecision(), decimalType.getScale());
break;
case ARRAY:
case VARBINARY:
byte[] bytes = new byte[rnd.nextInt(16) + 1];
rnd.nextBytes(bytes);
seeds[i] = type instanceof VarBinaryType ? bytes : BinaryArray.fromPrimitiveArray(bytes);
break;
case ROW:
RowType rowType = (RowType) type;
if (rowType.getFields().get(0).getType().getTypeRoot() == INTEGER) {
seeds[i] = GenericRow.of(rnd.nextInt());
} else {
seeds[i] = GenericRow.of(GenericRow.of(rnd.nextInt()));
}
break;
case ANY:
seeds[i] = new BinaryGeneric<>(rnd.nextInt());
break;
default:
throw new RuntimeException("Not support!");
}
}
Object[] results = new Object[RECORD_NUM];
for (int i = 0; i < RECORD_NUM; i++) {
results[i] = seeds[rnd.nextInt(seedNum)];
}
return results;
}