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/07/24 23:55:36 UTC
Re: [PR] fix: make native pow implementation compatible with Spark [datafusion-comet]
kazuyukitanimura commented on code in PR #5033:
URL: https://github.com/apache/datafusion-comet/pull/5033#discussion_r3648789744
##########
spark/src/test/resources/sql-tests/expressions/math/pow.sql:
##########
@@ -15,27 +15,25 @@
-- specific language governing permissions and limitations
-- under the License.
+-- pow runs natively and matches Spark exactly, including edge cases such as pow(0, -1) = Infinity.
+
statement
CREATE TABLE test_pow(base double, exp double) USING parquet
statement
INSERT INTO test_pow VALUES (0.0, -1), (2.0, 3.0), (0.0, 0.0), (-1.0, 2.0), (-1.0, 0.5), (2.0, -1.0), (NULL, 2.0), (2.0, NULL), (cast('NaN' as double), 2.0), (cast('Infinity' as double), 2.0), (2.0, cast('Infinity' as double))
Review Comment:
What about negative zero cases? and subnormal numbers?
--
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