malinjawi opened a new pull request, #13357: URL: https://github.com/apache/gluten/pull/13357
## What changes are proposed in this pull request? Part of #9003. This is the native half of #13165, split out to make review easier. Delta's `IncrementMetric` counts how many rows an expression is evaluated on, and Velox already tracks that per expression (`ExprStats::numProcessedRows`). This adds the native side of counting it there: - 32 fixed counter functions, `increment_metric_0` to `increment_metric_31`. Each one is a pass-through, marked non-deterministic so Velox never constant-folds or dictionary-peels it, and without default null behavior so null inputs still count. - For a plan that calls a counter, `WholeStageResultIterator` forces `operator_track_expression_stats=true` and `expression.eval_simplified=false` after the user's overrides (simplified evaluation doesn't count rows), and exports the counters' processed-row counts with the operator metrics. Nothing calls these functions yet, so plans and metrics don't change. #C_PR reads the counts on the JVM side, and #13165 makes the Delta transformers emit the calls. ## How was this patch tested? `IncrementMetricFunctionTest`: pass-through including nulls, per-branch counts inside `if`, detecting counters in a plan, and that the forced configs keep counting under a user's `eval_simplified=true`. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: IBM Bob -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
