private static RowKeySchema buildSchema(int[] widths) { RowKeySchemaBuilder builder = new RowKeySchemaBuilder().setMinNullable(10); for (final int width : widths) { builder.addField( new PDatum() { @Override public boolean isNullable() { return false; } @Override public PDataType getDataType() { return PDataType.CHAR; } @Override public Integer getByteSize() { return width; } @Override public Integer getMaxLength() { return width; } @Override public Integer getScale() { return null; } @Override public ColumnModifier getColumnModifier() { return null; } }); } return builder.build(); }
public SkipScanFilterTest( List<List<KeyRange>> cnf, int[] widths, List<Expectation> expectations) { this.expectations = expectations; this.cnf = cnf; RowKeySchemaBuilder builder = new RowKeySchemaBuilder().setMinNullable(10); for (final int width : widths) { builder.addField( new PDatum() { @Override public boolean isNullable() { return false; } @Override public PDataType getDataType() { return PDataType.CHAR; } @Override public Integer getByteSize() { return width; } @Override public Integer getMaxLength() { return width; } @Override public Integer getScale() { return null; } }); } skipper = new SkipScanFilter(cnf, builder.build()); }