@Test
public void testCount_NonExistColumn() throws Throwable {
LongColumnInterpreter columnInterpreter = new LongColumnInterpreter();
AggregationClient aggregationClient = new AggregationClient(
Config.getConfiguration());
Scan scan = new Scan();
scan.addColumn(ColumnFamilyName, QName_NotExistColumn);
Long count = aggregationClient.rowCount(TableNameBytes,
columnInterpreter, scan);
// Assert.assertTrue(count.longValue() == 4);
Assert.assertTrue(count.longValue() == 0);
}
老版本的hbase count时可以用不存在的列count,结果是包含该行的。
较新版本的hbase count时用不存在的列count,结果是0。