sunchao commented on code in PR #5403: URL: https://github.com/apache/datafusion-comet/pull/5403#discussion_r3837146731
########## spark/src/test/resources/sql-tests/expressions/array/array_min.sql: ########## @@ -49,16 +49,16 @@ INSERT INTO test_array_min_double VALUES query SELECT array_min(arr) FROM test_array_min_double --- Spark treats +0.0 and -0.0 as equal and returns +0.0; Comet returns -0.0. --- Surfaced by https://github.com/apache/datafusion-comet/issues/5271 +-- Spark preserves the first equal zero (+0.0 here); the native minimum returns -0.0. +-- Native parity is tracked by https://github.com/apache/datafusion-comet/issues/5401. statement CREATE TABLE test_array_min_dbl_negzero(arr array<double>) USING parquet statement INSERT INTO test_array_min_dbl_negzero VALUES (array(0.0, double('-0.0'), 1.0)) -query ignore(array_min signed-zero: Spark +0.0, Comet -0.0) +query ignore(https://github.com/apache/datafusion-comet/issues/5401) Review Comment: For cases where fallback is expected, I agree that `query expect_fallback(...)` is a better regression check than `ignore`. I've reworked `array_min` and `array_max` locally to follow Spark's ordering natively. In that revision, these signed-zero cases use plain `query` assertions, so they must execute natively and match Spark in both strict and non-strict modes. The separate non-default-collation tests use `query expect_fallback(...)`, since those cases still require Spark by default. The rework is ready locally but hasn't been pushed yet, so the current PR diff still contains the old `ignore`. I'll update the branch once I can publish it. -- 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]
