You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "rich7420 (via GitHub)" <gi...@apache.org> on 2026/09/12 11:51:08 UTC

[PR] test: cover round expression routing configurations [datafusion-comet]

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

   ## Which issue does this PR close?
   
   Part of #4616.
   
   ## Rationale for this change
   
   The `round` SQL tests do not check routing with the codegen dispatcher disabled or when `allowIncompatible` changes.
   
   ## What changes are included in this PR?
   
   Run the fixture with `allowIncompatible` both disabled and enabled. Assert that disabling the dispatcher keeps integral and decimal inputs native and sends float and double inputs to Spark with the expected fallback reason.
   
   ## How are these changes tested?
   
   Both configurations pass locally on Spark 4.1. Injected regressions that ignore the dispatcher-disable guard or make native support depend on the dispatcher are caught by the new assertions.
   
   [Fork CI](https://github.com/rich7420/datafusion-comet/actions/runs/34584664224) passed, including all six expressions jobs across Spark 3.4–4.2 and macOS Spark 4.0.
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] test: cover round expression routing configurations [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #5878:
URL: https://github.com/apache/datafusion-comet/pull/5878


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] test: cover round expression routing configurations [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #5878:
URL: https://github.com/apache/datafusion-comet/pull/5878#discussion_r3996935615


##########
spark/src/test/resources/sql-tests/expressions/math/round.sql:
##########
@@ -93,3 +97,17 @@ SELECT l, round(l, -19), round(l, -20) FROM test_round_long_overflow
 
 query
 SELECT round(5000000000000000000L, -19), round(-5000000000000000000L, -19)
+
+-- Disabling the dispatcher leaves supported types native and sends float/double inputs to Spark,
+-- even with allowIncompatible enabled.
+statement
+SET spark.comet.exec.scalaUDF.codegen.enabled=false

Review Comment:
   This is the first fixture in `sql-tests/` that changes config with a mid-file `SET`. It works because the `Config: ...codegen.enabled=true` line at the top makes `withSQLConf` restore the flag after the file, but nothing in the fixture says that, and the top-of-file directive now reads as if the dispatcher is on for the whole file. If someone later removes that seemingly redundant `Config` line, the `SET` leaks and every fixture that runs afterwards silently loses dispatcher coverage.
   
   Could we follow the existing pattern instead and move these three queries into their own fixture with `-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false` at the top? `misc/codegen_dispatch_disabled_fallback.sql` is the precedent. That keeps each file under a single config.



##########
spark/src/test/resources/sql-tests/expressions/math/round.sql:
##########
@@ -15,9 +15,13 @@
 -- specific language governing permissions and limitations
 -- under the License.
 
+-- Config: spark.comet.exec.scalaUDF.codegen.enabled=true
+-- ConfigMatrix: spark.comet.expression.round.allowIncompatible=false,true

Review Comment:
   I don't think this matrix can observe anything. `CometRound.getSupportLevel` only returns `Unsupported` or `Compatible`, and the `Unsupported` arm in `exprToProtoInternal` never reads `allowIncompatible`. So both matrix values run the exact same code, and the whole file (including the overflow tables and every existing query) runs twice. The sql-file-tests doc asks us not to add `ConfigMatrix` speculatively.
   
   Could we drop the matrix here? If the goal is to guard against float/double being reclassified as `Incompatible` in the future, that would be better handled by whichever PR makes that change adding the row 2 coverage at that point.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org