You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code dedicated to Categorize has made its way into Aggregate & replaced rules such as (ReplaceAggregateAggExpressionWithEval or ReplaceAggregateNestedExpressionWithEval). While some of it is marked with TODO, this needs to extracted into a central place (to better manage it) or even better, make it work with the existing rules either by breaking down categorize into existing primitives (e.g. Aware interfaces) or extracting these if missing.
From the logical plan perspective, Categorize is just another aggregate function - special handling is typically an indicator of wrong abstraction (which causes the rules to 'misfire').
The text was updated successfully, but these errors were encountered:
Categorize is a special GroupingFunction because it's "stateful". We could add some kind of isStateful() to GroupingFunction and override it there, or a new StatefulGroupingFunction subclass.
Also, the only other GroupingFunction subclass is Bucket, which technically works as a normal function. We could make Bucket inherit from Function instead, to simplify the meaning of that subclass, and queries bucket things in EVALs too. This would be a functional change, but not a breaking change. We could keep it as a "grouping function" in the docs.
This is something I would discuss before working on this issue
Description
Code dedicated to Categorize has made its way into Aggregate & replaced rules such as (
ReplaceAggregateAggExpressionWithEval
orReplaceAggregateNestedExpressionWithEval
). While some of it is marked with TODO, this needs to extracted into a central place (to better manage it) or even better, make it work with the existing rules either by breaking down categorize into existing primitives (e.g. Aware interfaces) or extracting these if missing.From the logical plan perspective,
Categorize
is just another aggregate function - special handling is typically an indicator of wrong abstraction (which causes the rules to 'misfire').The text was updated successfully, but these errors were encountered: