-
Notifications
You must be signed in to change notification settings - Fork 24
1.2.1 Release Notes (2023 07 04)
IHEII edited this page Jul 27, 2023
·
2 revisions
Previous Release Notes: 1.2.0 Release Notes (2023 05 29)
We now support aggregation which included Min, Max, Count, Sum, Avg
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.
We fix some bugs in this release.
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.
You could learn more about the TTL column in OBKV from tests
We fix #30 default scale in number type should be -1 in this release.