Skip to content

Conversation

@stloyd
Copy link
Member

@stloyd stloyd commented Oct 12, 2023

Change Log

Added

Fixed

  • Prevent fatal error with aggregate avg on empty group

Changed

Removed

Deprecated

Security


Description

Error:

PHP Fatal error:  Uncaught DivisionByZeroError: Division by zero in /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/GroupBy/Aggregator/Average.php:49
Stack trace:
#0 /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/GroupBy.php(101): Flow\ETL\GroupBy\Aggregator\Average->result()
#1 /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/Pipeline/GroupByPipeline.php(62): Flow\ETL\GroupBy->result()
#2 /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/DataFrame.php(582): Flow\ETL\Pipeline\GroupByPipeline->process(Object(Flow\ETL\FlowContext))
#3 /Users/stloyd/Documents/flow/examples/topics/aggregations/power_plant_bar_chart.php(56): Flow\ETL\DataFrame->run()
#4 /Users/stloyd/Documents/flow/examples/run_examples.php(47): include('/Users/stloyd/D...')
#5 {main}
  thrown in /Users/stloyd/Documents/flow/src/core/etl/src/Flow/ETL/GroupBy/Aggregator/Average.php on line 49

@stloyd stloyd requested a review from norberttech October 12, 2023 12:47
@norberttech norberttech enabled auto-merge (squash) October 12, 2023 12:49
@norberttech norberttech merged commit e27682f into flow-php:1.x Oct 12, 2023
@stloyd stloyd deleted the bug/group-aggr-avg branch October 12, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants