Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions zudb-corpus/src/main/java/dev/zudb/corpus/Cell.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
* That is a fact about this engine rather than about the corpus, since its
* own value is one signed 64 bit integer either way.
*
* <p>Two of these are the same value when they are {@link #equals}, which
* is the whole reason for records here. A float is the case that usually
* needs a comparison written by hand: NaN is not equal to itself and a case
* asserting NaN has to pass, and 0.0 equals -0.0 and a case asserting -0.0
* has to fail on 0.0, because the sign of zero is exactly the sort of thing
* that survives one binding and not another. A record's generated equality
* compares a double with {@code Double.compare}, which says yes to the
* first pair and no to the second, so it is already the comparison the
* corpus wants. {@link Bytes} is the one that is not, since an array
* compares by identity, and it is written out below.
* <p>Two of these are the same value when they are {@link Object#equals(Object)
* equal}, which is the whole reason for records here. A float is the case
* that usually needs a comparison written by hand: NaN is not equal to
* itself and a case asserting NaN has to pass, and 0.0 equals -0.0 and a
* case asserting -0.0 has to fail on 0.0, because the sign of zero is
* exactly the sort of thing that survives one binding and not another. A
* record's generated equality compares a double with
* {@code Double.compare}, which says yes to the first pair and no to the
* second, so it is already the comparison the corpus wants. {@link Bytes}
* is the one that is not, since an array compares by identity, and it is
* written out below.
*/
public sealed interface Cell {

Expand Down
7 changes: 6 additions & 1 deletion zudb-corpus/src/test/java/dev/zudb/corpus/RunnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,18 @@ record Wrong(String what, String body, String want) {}
* A case the engine has not caught up to is unsupported and not a
* failure, which is what lets the corpus be the contract and the engine
* catch up to it. The two classes that say so are 42 and 0A.
*
* <p>The statement has to be one the engine really has not reached, and
* a test like this is a canary by construction: the day CREATE lands,
* this stops testing what it says it tests and has to pick another
* spelling. It was SELECT before, which the engine now parses.
*/
@Test
void aCaseAheadOfTheEngineIsUnsupportedAndNotAFailure() {
Runner.Ran got = only("""
- name: one
doc: d
query: SELECT 1
query: CREATE NODE TABLE person(uid INT64)
columns:
- n
rows:
Expand Down
Loading