Skip to content

Commit

Permalink
Aggregates: combine sum/mean aggregators. (#4440)
Browse files Browse the repository at this point in the history
This combines the sum and mean aggregators into base class.

---
TYPE: IMPROVEMENT
DESC: Aggregates: combine sum/mean aggregators.
  • Loading branch information
KiterLuc authored Oct 23, 2023
1 parent 595e409 commit d3c3e5f
Show file tree
Hide file tree
Showing 13 changed files with 170 additions and 367 deletions.
1 change: 0 additions & 1 deletion test/src/test-cppapi-aggregates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "tiledb/sm/cpp_api/tiledb"
#include "tiledb/sm/cpp_api/tiledb_experimental"
#include "tiledb/sm/query/readers/aggregators/count_aggregator.h"
#include "tiledb/sm/query/readers/aggregators/mean_aggregator.h"
#include "tiledb/sm/query/readers/aggregators/min_max_aggregator.h"
#include "tiledb/sm/query/readers/aggregators/sum_aggregator.h"

Expand Down
1 change: 0 additions & 1 deletion tiledb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ set(TILEDB_CORE_SOURCES
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/query_condition.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/query_remote_buffer_storage.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/readers/aggregators/count_aggregator.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/readers/aggregators/mean_aggregator.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/readers/aggregators/min_max_aggregator.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/readers/aggregators/operation.cc
${TILEDB_CORE_INCLUDE_DIR}/tiledb/sm/query/readers/aggregators/output_buffer_validator.cc
Expand Down
8 changes: 0 additions & 8 deletions tiledb/sm/query/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,6 @@ class Query {
default_channel_aggregates_.emplace(output_field_name, aggregator);
}

/**
* Get all aggregates from the default channel.
*/
std::unordered_map<std::string, shared_ptr<IAggregator>>
get_default_channel_aggregates() {
return default_channel_aggregates_;
}

/** Returns an aggregate based on the output field. */
std::optional<shared_ptr<IAggregator>> get_aggregate(
std::string output_field_name) const;
Expand Down
2 changes: 1 addition & 1 deletion tiledb/sm/query/readers/aggregators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ include(object_library)
# `aggregators` object library
#
commence(object_library aggregators)
this_target_sources(count_aggregator.cc mean_aggregator.cc min_max_aggregator.cc operation.cc output_buffer_validator.cc safe_sum.cc sum_aggregator.cc)
this_target_sources(count_aggregator.cc min_max_aggregator.cc operation.cc output_buffer_validator.cc safe_sum.cc sum_aggregator.cc)
this_target_object_libraries(baseline array_schema)
conclude(object_library)

Expand Down
2 changes: 0 additions & 2 deletions tiledb/sm/query/readers/aggregators/aggregate_with_count.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* @section DESCRIPTION
*
* This file defines class AggregateWithCount.
*
* TODO: Add more benchmark coverage for this class (sc-33758).
*/

#ifndef TILEDB_AGGREGATE_WITH_COUNT_H
Expand Down
153 changes: 0 additions & 153 deletions tiledb/sm/query/readers/aggregators/mean_aggregator.cc

This file was deleted.

157 changes: 0 additions & 157 deletions tiledb/sm/query/readers/aggregators/mean_aggregator.h

This file was deleted.

2 changes: 0 additions & 2 deletions tiledb/sm/query/readers/aggregators/safe_sum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* @section DESCRIPTION
*
* This file implements class SafeSum.
*
* TODO: Testing for this class is not done (sc-33762).
*/

#include "tiledb/sm/query/readers/aggregators/safe_sum.h"
Expand Down
Loading

0 comments on commit d3c3e5f

Please sign in to comment.