Skip to content

Commit

Permalink
update test to be default-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk committed Oct 12, 2023
1 parent 5bb4ba1 commit e532859
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public void verifyResults(QueryResults results) throws Exception
}
Assert.assertEquals(1, results.recordedQueries.size());

maybeDumpActualResults(results.results);
final WindowOperatorQuery query = getWindowOperatorQuery(results.recordedQueries);
for (int i = 0; i < input.expectedOperators.size(); ++i) {
final OperatorFactory expectedOperator = input.expectedOperators.get(i);
Expand All @@ -145,7 +146,6 @@ public void verifyResults(QueryResults results) throws Exception
Assert.assertEquals(types[i], results.signature.getColumnType(i).get());
}

maybeDumpActualResults(results.results);
for (Object[] result : input.expectedResults) {
for (int i = 0; i < result.length; i++) {
// Jackson deserializes numbers as the minimum size required to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ type: "operatorValidation"
sql: |
SELECT
l2,
MIN(l2) OVER()
MIN(l2) OVER(partition by l2)
FROM druid.numfoo
WHERE l2 is null or l2 = -1111
WHERE l2 is null or l2 = -1111 or l2 = 0


expectedOperators:
- { type: "naivePartition", partitionColumns: [ ] }
- type: "naiveSort"
columns:
- column: "l2"
direction: "ASC"
- type: "naivePartition"
partitionColumns: [ "l2" ]
- type: "window"
processor:
type: "framedAgg"
Expand All @@ -22,3 +27,4 @@ expectedResults:
- [null,null]
- [null,null]
- [null,null]
- [0,0]

0 comments on commit e532859

Please sign in to comment.