Skip to content

Commit

Permalink
internal/manifest: additional range key test cases for order checks
Browse files Browse the repository at this point in the history
Add two additional sets of ordering test cases for tables with
exclusively range keys and tables with both point and range keys.
  • Loading branch information
nicktrav committed Mar 10, 2022
1 parent 93d4722 commit 4dc50ec
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions internal/manifest/testdata/version_check_ordering
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,76 @@ L2 files 000002 and 000003 have overlapping ranges: [b#3,SET-d#4,SET] vs [c#5,SE
2:
000002:[b#3,SET-d#4,SET] points:[b#3,SET-d#4,SET]
000003:[c#5,SET-e#6,SET] points:[c#5,SET-e#6,SET]

# Ordering considers tables with just range keys.

check-ordering
0:
000002:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000001:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
----
OK

check-ordering
0:
000002:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000001:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
----
L0 files 000001 and 000002 are not properly ordered: <#3-#72057594037927935> vs <#1-#72057594037927935>
0.0:
000001:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#3,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
000002:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]

check-ordering
1:
000001:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
000002:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
----
OK

check-ordering
1:
000001:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000002:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
----
L1 files 000001 and 000002 are not properly ordered: [c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] vs [a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
1:
000001:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET] ranges:[c#3,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000002:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]

# Ordering considers tables with both point and range keys.

check-ordering
0:
000002:[c#1,RANGEKEYSET-e#4,SET] points:[d#3,SET-e#4,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
----
OK

check-ordering
0:
000002:[c#1,RANGEKEYSET-e#2,SET] points:[d#3,SET-e#2,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
000001:[a#1,RANGEKEYSET-c#4,SET] points:[b#1,SET-c#4,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
----
L0 files 000001 and 000002 are not properly ordered: <#1-#4> vs <#1-#2>
0.1:
000002:[c#1,RANGEKEYSET-e#2,SET] points:[d#3,SET-e#2,SET] ranges:[c#1,RANGEKEYSET-d#72057594037927935,RANGEKEYSET]
0.0:
000001:[a#1,RANGEKEYSET-c#4,SET] points:[b#1,SET-c#4,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]

check-ordering
1:
000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
000002:[d#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[d#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET]
----
OK

check-ordering
1:
000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
000002:[c#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[c#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET]
----
L1 files 000001 and 000002 have overlapping ranges: [a#1,RANGEKEYSET-c#2,SET] vs [c#3,RANGEKEYSET-f#4,SET]
1:
000001:[a#1,RANGEKEYSET-c#2,SET] points:[b#1,SET-c#2,SET] ranges:[a#1,RANGEKEYSET-b#72057594037927935,RANGEKEYSET]
000002:[c#3,RANGEKEYSET-f#4,SET] points:[e#3,SET-f#4,SET] ranges:[c#3,RANGEKEYSET-e#72057594037927935,RANGEKEYSET]

0 comments on commit 4dc50ec

Please sign in to comment.