-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: boolean columns (tests) (#219): add booleanEquals tests
Test results were verified using https://github.com/pflanze/ndjson-updater/. In `booleanEquals_Or.json`, `"value": "B.1"` would return `"count": 97`, but the second subquery would include all of those from the first hence not so interesting, thus `"B.1.1"` was chosen.
- Loading branch information
Showing
4 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"testCaseName": "BooleanEquals for test_boolean_column", | ||
"query": { | ||
"action": { | ||
"type": "Aggregated" | ||
}, | ||
"filterExpression": { | ||
"type": "BooleanEquals", | ||
"column": "test_boolean_column", | ||
"value": true | ||
} | ||
}, | ||
"expectedQueryResult": [ | ||
{ | ||
"count": 41 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"testCaseName": "BooleanEquals with And", | ||
"query": { | ||
"action": { | ||
"type": "Aggregated" | ||
}, | ||
"filterExpression": { | ||
"type": "And", | ||
"children": [ | ||
{ | ||
"type": "BooleanEquals", | ||
"column": "test_boolean_column", | ||
"value": false | ||
}, | ||
{ | ||
"type": "PangoLineage", | ||
"column": "pango_lineage", | ||
"value": "B.1", | ||
"includeSublineages": true | ||
} | ||
] | ||
} | ||
}, | ||
"expectedQueryResult": [ | ||
{ | ||
"count": 37 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"testCaseName": "BooleanEquals with Or", | ||
"query": { | ||
"action": { | ||
"type": "Aggregated" | ||
}, | ||
"filterExpression": { | ||
"type": "Or", | ||
"children": [ | ||
{ | ||
"type": "BooleanEquals", | ||
"column": "test_boolean_column", | ||
"value": null | ||
}, | ||
{ | ||
"type": "PangoLineage", | ||
"column": "pango_lineage", | ||
"value": "B.1.1", | ||
"includeSublineages": true | ||
} | ||
] | ||
} | ||
}, | ||
"expectedQueryResult": [ | ||
{ | ||
"count": 68 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"testCaseName": "boolean Details", | ||
"query": { | ||
"action": { | ||
"type": "Details", | ||
"fields": ["test_boolean_column", "gisaid_epi_isl"], | ||
"orderByFields": ["gisaid_epi_isl"], | ||
"limit": 10 | ||
}, | ||
"filterExpression": { | ||
"type": "True" | ||
} | ||
}, | ||
"expectedQueryResult": [ | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1001493", | ||
"test_boolean_column": true | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1001920", | ||
"test_boolean_column": false | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1002052", | ||
"test_boolean_column": true | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1002156", | ||
"test_boolean_column": true | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003010", | ||
"test_boolean_column": true | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003036", | ||
"test_boolean_column": null | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003373", | ||
"test_boolean_column": false | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003425", | ||
"test_boolean_column": true | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003519", | ||
"test_boolean_column": false | ||
}, | ||
{ | ||
"gisaid_epi_isl": "EPI_ISL_1003629", | ||
"test_boolean_column": null | ||
} | ||
] | ||
} |