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

    https://github.com/apache/incubator-quickstep/pull/90#discussion_r74788446
  
    --- Diff: expressions/aggregation/AggregationHandleAvg.hpp ---
    @@ -109,6 +123,35 @@ class AggregationHandleAvg : public 
AggregationConcreteHandle {
         ++state->count_;
       }
     
    +  inline void iterateUnaryInlFast(const TypedValue &value, uint8_t 
*byte_ptr) const {
    +    DCHECK(value.isPlausibleInstanceOf(argument_type_.getSignature()));
    +    if (value.isNull()) return;
    +    TypedValue *sum_ptr = reinterpret_cast<TypedValue *>(byte_ptr + 
blank_state_.sum_offset);
    +    std::int64_t *count_ptr = reinterpret_cast<std::int64_t *>(byte_ptr + 
blank_state_.count_offset);
    +    *sum_ptr = fast_add_operator_->applyToTypedValues(*sum_ptr, value);
    +    ++(*count_ptr);
    +  }
    +
    +  inline void iterateInlFast(const std::vector<TypedValue> &arguments, 
uint8_t *byte_ptr) const override {
    +     if (block_update) return;
    --- End diff --
    
    Could be refactored to 
    ```
    if (!block_update) {
      iterateUnaryInlFast()
    
    }
    ```


---
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