Github user jianqiao commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/179#discussion_r99901875
  
    --- Diff: storage/AggregationOperationState.hpp ---
    @@ -156,6 +152,29 @@ class AggregationOperationState {
           const CatalogDatabaseLite &database);
     
       /**
    +   * @brief Get the number of partitions to be used for initializing the
    +   *        aggregation.
    +   *
    +   * @return The number of partitions to be used for initializing the 
aggregation.
    +   **/
    +  std::size_t getNumInitializationPartitions() const;
    +
    +  /**
    +   * @brief Get the number of partitions to be used for finalizing the
    +   *        aggregation.
    +   *
    +   * @return The number of partitions to be used for finalizing the 
aggregation.
    +   **/
    +  std::size_t getNumFinalizationPartitions() const;
    --- End diff --
    
    Currently initialization is for `memset` the storage memory. It is much 
faster than finalization so we expect to have a smaller number of 
initialization partitions than finalization partitions if the storage memory is 
not large.
    
    E.g. suppose the vector table has 1 million entries of `int` keys and 
`std::int64_t` states -- amount to 12MB storage memory. Then we may want 80 
partitions to finalize the table, but would not create 80 work orders to 
initialize the 12MB memory.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to