andygrove opened a new pull request, #4551:
URL: https://github.com/apache/datafusion-comet/pull/4551

   ## Which issue does this PR close?
   
   N/A. This adds test coverage only.
   
   ## Rationale for this change
   
   The SQL standard linear-regression aggregates (`regr_count`, `regr_avgx`, 
`regr_avgy`, `regr_sxx`, `regr_syy`, `regr_sxy`, `regr_slope`, 
`regr_intercept`, `regr_r2`) had no Comet test coverage. Comet already 
accelerates several of them natively, because Spark lowers them to `Count` / 
`Average` aggregates that Comet supports, but this was unverified. These tests 
establish which of the family run natively in Comet versus fall back to Spark, 
and guard the accelerated ones against future regressions.
   
   ## What changes are included in this PR?
   
   Adds one SQL file test, 
`spark/src/test/resources/sql-tests/expressions/aggregate/regr.sql`, covering 
all nine `regr_*` functions over global aggregates, `GROUP BY`, all-NULL input, 
and single-pair input (only rows where both `y` and `x` are non-null 
contribute).
   
   - `regr_count`, `regr_avgx`, `regr_avgy` run natively. They use the default 
`query` mode, which asserts the query executes on Comet without falling back to 
Spark and matches Spark exactly.
   - `regr_sxx`, `regr_syy`, `regr_sxy`, `regr_slope`, `regr_intercept`, 
`regr_r2` currently fall back to Spark, so they use `query spark_answer_only` 
to validate result correctness against Spark.
   
   ## How are these changes tested?
   
   This PR is test-only. The new file runs under `CometSqlFileTestSuite`, which 
executes each query through both Spark and Comet and compares results; the 
default `query` blocks additionally assert native (non-fallback) Comet 
execution. Verified locally:
   
   ```
   ./mvnw test -Dsuites="org.apache.comet.CometSqlFileTestSuite regr" 
-Dtest=none
   ```
   
   Result: the single discovered test file passes.


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

Reply via email to