alibaba / alibaba/simplehbase

hbase的count竟然不兼容

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
194
Forks
137
PR merge metrics
No merged PRs in 30d

Description

老版本的hbase count时可以用不存在的列count,结果是包含该行的。
较新版本的hbase count时用不存在的列count,结果是0。

```
@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);
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with testCount_NonExistColumn and the AggregationClient.rowCount call shown in the issue. Run the test with the project’s HBase setup and compare the result with the commented expectation of 4 and the current expectation of 0. Done means the intended behavior for a nonexistent column is established and the test reflects compatible behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.