You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "kazuyukitanimura (via GitHub)" <gi...@apache.org> on 2026/04/25 01:31:27 UTC

[PR] fix: round for float/double [datafusion-comet]

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

   ## Which issue does this PR close?
   
   Part of #2551
   
   ## Rationale for this change
   
   ## What changes are included in this PR?
   
   ## How are these changes tested?
   
   


-- 
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] fix: round for float/double [datafusion-comet]

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

   Test failure:
   
   ```
   - round *** FAILED *** (616 milliseconds)
     org.apache.spark.SparkNumberFormatException: [CAST_INVALID_INPUT] The value '-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3-3' of the type "STRING" cannot be cast to "DOUBLE" because it is malformed. Correct the value as per the syntax, or change its target type. Use `try_cast` to tolerate malformed input and return NULL instead. SQLSTATE: 22018
   == SQL (line 1, position 12) ==
   select _8, round(_8, -5) FROM tbl
              ^^^^^^^^^^^^^
   ```


-- 
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] fix: round for float/double [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed pull request #4078: fix: round for float/double
URL: https://github.com/apache/datafusion-comet/pull/4078


-- 
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] fix: round for float/double [datafusion-comet]

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

   Thanks @kazuyukitanimura. This looks good overall, but we need to think about configs for this. We have not enabled any JVM UDFs by default yet - they should be opt-in until the UDF functionality is more mature.
   
   There is a general discussion on the config approach in https://github.com/apache/datafusion-comet/issues/4310


-- 
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] fix: round for float/double [datafusion-comet]

Posted by "kazuyukitanimura (via GitHub)" <gi...@apache.org>.
kazuyukitanimura commented on PR #4078:
URL: https://github.com/apache/datafusion-comet/pull/4078#issuecomment-4523327682

   > Thanks @kazuyukitanimura. This looks good overall, but we need to think about configs for this. We have not enabled any JVM UDFs by default yet - they should be opt-in until the UDF functionality is more mature.
   > 
   > There is a general discussion on the config approach in #4310
   
   Thanks @andygrove
   I reverted the changes in native/spark-expr/src/math_funcs/round.rs so that we can choose to use the incompatible native implementations in the future if we need to.
   For now, we are disabling `round` by default, no option to enable. This PR returns JVM compatible results at least. What about merging this PR first that will unblock the TPCDS coverage issue?


-- 
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] fix: round for float/double [datafusion-comet]

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

   Closing this as stale to help reduce PR backlog. Feel free to reopen if you continue work on this @kazuyukitanimura 


-- 
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] fix: round for float/double [datafusion-comet]

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

   > > > Thanks @kazuyukitanimura. This looks good overall, but we need to think about configs for this. We have not enabled any JVM UDFs by default yet - they should be opt-in until the UDF functionality is more mature.
   > > > There is a general discussion on the config approach in #4310
   > > 
   > > 
   > > Thanks @andygrove I reverted the changes in native/spark-expr/src/math_funcs/round.rs so that we can choose to use the incompatible native implementations in the future if we need to. We are currently disabling `round` by default, no option to enable. This PR returns JVM compatible results at least. What about merging this PR first for now and that will unblock the TPCDS coverage issue?
   > 
   > This PR enabled a Comet JVM UDF by default. This would be the first one if we merge it. I don't know if we are ready to enable JVM UDF by default yet.
   
   Perhaps if this is re-implemented to use the new UDF codegen approach then it would be gated on `CometConf.COMET_SCALA_UDF_CODEGEN_ENABLED` which is disabled by default.


-- 
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] fix: round for float/double [datafusion-comet]

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

   > > Thanks @kazuyukitanimura. This looks good overall, but we need to think about configs for this. We have not enabled any JVM UDFs by default yet - they should be opt-in until the UDF functionality is more mature.
   > > There is a general discussion on the config approach in #4310
   > 
   > Thanks @andygrove I reverted the changes in native/spark-expr/src/math_funcs/round.rs so that we can choose to use the incompatible native implementations in the future if we need to. We are currently disabling `round` by default, no option to enable. This PR returns JVM compatible results at least. What about merging this PR first for now and that will unblock the TPCDS coverage issue?
   
   This PR enabled a Comet JVM UDF by default. This would be the first one if we merge it. I don't know if we are ready to enable JVM UDF by default yet.


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