Skip to content

s3 parity corpus: the CAST-pair comment explains only the negated row, and hardcodes the test count #768

Description

@philcunliffe

Follow-up from PR #751, shipped at f705417. Documentation-only; no behaviour change.

Where: test/plugins/s3-query-dataset.test.js:216-223, the comment above the two
CAST cases.

Problem. The comment is true but explains only the negated row.
['ts > CAST(300 AS BIGINT)', [5]] (line 222) fires under none of the known
regression classes (the pre-#721 trio, a true hyparquet floor drop, cast-fold
removal, all measured in #751's review record), so a maintainer following the
comment's own logic would delete it as decoration.

It is not decoration. Under hyparquet 1.28.1 a null cell coerces to 0, so
0 > 300 is false (the positive form is right by luck) while 0 <= 300 is true
(the negated form is wrong). Both rows compile to bare unguarded operators
({ts:{$gt:300n}} and {ts:{$lte:300n}}); the positive row is the control that
makes the asymmetry legible.

Separately, (verified: ... this file is still 7/0) hardcodes the file's current
test count and reads stale the moment an eighth test is added.

Fix. In that comment, replace 7/0 with still fully green, and add one clause
after "so this does not pin the fold":

// The negated form is the one case in this corpus that fails when the
// remote tier's hyparquet drops below 1.28.2: a null cell coerces to 0
// there, so 0 <= 300 wrongly matches while 0 > 300 misses by luck,
// which is why both directions are here.

Refs: PR #751, its fresh round 1 and round 2 at the reduced head, LLP 0222#hyparquet-floor.

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

    Labels

    neutral:fixDelegate this issue to neutral for an autonomous fix attempt (reproduce -> fix -> PR)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions