https://pinot.apache.org/ logo
Join Slack
Powered by
# general
  • m

    Mayank

    05/03/2020, 10:04 PM
    Copy code
    public void aggregate(TransformBlock transformBlock) {
        int length = transformBlock.getNumDocs();
        for (int i = 0; i < _numFunctions; i++) {
          AggregationFunction function = _functions[i];
          AggregationResultHolder resultHolder = _resultHolders[i];
          if (function.getType() == AggregationFunctionType.COUNT) {
            // handle count(*) function
            function.aggregate(length, resultHolder, Collections.emptyMap());
          } else {
            // handle rest of the aggregate functions -- sum, min, max etc
            Map<String, BlockValSet> blockValSetMap = new HashMap<>();
    
            for (int j = 0; j < _expressions[i].length; j++) {
              blockValSetMap.put(_expressions[i][j].toString(), transformBlock.getBlockValueSet(_expressions[i][j]));
            }
            function.aggregate(length, resultHolder, blockValSetMap);
          }
        }
      }
  • d

    Damiano

    05/03/2020, 10:04 PM
    ah ok! it is not merged
  • m

    Mayank

    05/03/2020, 10:04 PM
    From my local change ^^
  • m

    Mayank

    05/03/2020, 10:05 PM
    Note, there's no special case for distinct
  • d

    Damiano

    05/03/2020, 10:05 PM
    in the current source code yes
  • d

    Damiano

    05/03/2020, 10:05 PM
    in this one you just posted no
  • d

    Damiano

    05/03/2020, 10:05 PM
    so, what can i do? just copy that part?
  • m

    Mayank

    05/03/2020, 10:06 PM
    yes copy paste
  • m

    Mayank

    05/03/2020, 10:06 PM
    for now
  • d

    Damiano

    05/03/2020, 10:08 PM
    ok
  • d

    Damiano

    05/03/2020, 10:09 PM
    @User blockValSetMap.put(_expressions[i][j].toString(), transformBlock.getBlockValueSet(_expressions[i][j]));
  • d

    Damiano

    05/03/2020, 10:09 PM
    i have problems there
  • d

    Damiano

    05/03/2020, 10:09 PM
    Copy code
    >> _expressions[i] <<
  • m

    Mayank

    05/03/2020, 10:09 PM
    I see
  • m

    Mayank

    05/03/2020, 10:09 PM
    so copy paste wont' work
  • d

    Damiano

    05/03/2020, 10:10 PM
    Copy code
    _expressions[i].length << this no works!  only this >>  _expressions.length
  • m

    Mayank

    05/03/2020, 10:10 PM
    Try patching this PR https://github.com/apache/incubator-pinot/pull/5316
  • m

    Mayank

    05/03/2020, 10:11 PM
    ^^ has the complete change
  • d

    Damiano

    05/03/2020, 10:11 PM
    @User what can i do exactly? do you mean i just need to clone the entire project again including this PR too ?
  • m

    Mayank

    05/03/2020, 10:12 PM
    No, you can create a patch of this PR and apply to your local
  • m

    Mayank

    05/03/2020, 10:13 PM
    or, you can create separate branch locally (from master), then apply the above PR, then rebase it to have your changes on top
  • d

    Damiano

    05/04/2020, 10:52 PM
    hello, is there a way to understand why Pinot is not calling my aggregate method using DateType.BYTES too? i have created a custom object, i also have created the serialization/deserialization methods...but i do not understand why Pinot is not using BYTES and it do not go ahead. Debugging the code i just see it calls aggregate() 3 times and stop, no merge() call.
  • d

    Damiano

    05/04/2020, 11:19 PM
    Hmm AvgAggregationFunction the same... why?! i ran the following query:
    select AVG(doules) as foo from baseballStats
  • k

    Kishore G

    05/04/2020, 11:20 PM
    if there is only one segment, merge wont be called
  • k

    Kishore G

    05/04/2020, 11:20 PM
    it will directly call extractFinalResult
  • d

    Damiano

    05/04/2020, 11:20 PM
    @User hmm ok it makes sense but extractFinalResult too
  • d

    Damiano

    05/04/2020, 11:20 PM
    Pinot is not calling it
  • d

    Damiano

    05/04/2020, 11:21 PM
    neither with mine aggr. nor with AVG
  • d

    Damiano

    05/05/2020, 12:43 AM
    The problem has been solved by @User The explanation is that extractFinalResult was not hit because in debugging mode a query timeout error occurred. That's the reason. Thanks @User!!
    👍 2
  • s

    Sidd

    05/05/2020, 12:44 AM
    CombineOperator was timing out in debug mode (depending on how many breakpoints are there and how quickly we move from one breakpoint to another)
1...130131132...160Latest