Skip to content

test: close remaining signed-zero SQL assertion gaps #5402

Description

@sunchao

Describe the bug

#5393 fixes decimal-coerced negative-zero literals, but a few SQL assertions still do not fully exercise signed-zero behavior:

  • In arrays_zip.sql, replacing the bare decimal zero with float('-0.0') changes the second result field from DOUBLE to FLOAT. The first field remains double, but an explicit double signed-zero assertion is still needed.
  • In the float and double array_intersect.sql fixtures, [+0.0, -0.0] intersected with [+0.0] returns [+0.0] whether membership distinguishes the signs. Opposite-sign singleton inputs in both directions, plus a same-sign negative-zero control, exercise the distinction.
  • In percentile.sql, the special-value query asks for probabilities 0, 0.5, 0.8, and 1. Its results are [-Infinity, 0.5, Infinity, NaN], so losing the negative-zero input would not fail the test.

Expected coverage

Preserve the existing double arrays_zip test shape and add explicit float/double signed-zero column cases. Add the singleton intersections using the SQL harness's Spark oracle, since Spark 4.2 changes floating-point set-operation normalization. For percentile, use separate groups with only one zero sign and compare exact median results; mixed-sign zero ties can introduce ordering-dependent assertions.

These are test-coverage follow-ups to #5271 and #5393. They do not establish a new production regression.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions