Skip to content

1.2.1 Release Notes (2023 07 04)

IHEII edited this page Jul 27, 2023 · 2 revisions

OBKV Table Client Java v1.2.2 Release Notes

Previous Release Notes: 1.2.0 Release Notes (2023 05 29)

1. Abstract

1.1 Aggregation

We now support aggregation which included Min, Max, Count, Sum, Avg

1.2 Supplement Test Cases

TTL(Time To Live) is an important feature in OBKV. We add some cases on this feature to check whether it works as we expected.

1.3 Some Bug fixes

We fix some bugs in this release.

2. Aggregation

You could easily aggregate your data from OBKV by:

ObTableAggregation obtableAggregation = client.aggregate("Your_Table");

// Set if the table is a partition table or you want to accelerate processing
obtableAggregation.addScanRange(new Object[] { 0L }, new Object[] { 150L });

// Set aggregation operation
obtableAggregation.max("column_name");
obtableAggregation.count();
obtableAggregation.sum("column_name");
obtableAggregation.avg("column_name");

// Execute
ObTableAggregationResult obtableAggregationResult = obtableAggregation.execute();

// Get aggregation result
System.out.println(obtableAggregationResult.get("max(column_name)");
System.out.println(obtableAggregationResult.get("count(*)");
System.out.println(obtableAggregationResult.get("sum(column_name)");
System.out.println(obtableAggregationResult.get("avg(column_name)");

Notes: In order to ensure the consistency of your aggregation data, we do not open cross-partition aggregation for the time being. You could do aggregation on the partition table by carefully setting your partition key to ensure you aggregate in one partition.

3. Test Cases for TTL

You could learn more about the TTL column in OBKV from tests

4. Some Bug fixes

We fix #30 default scale in number type should be -1 in this release.