Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,17 @@ pid,datum,value,sum,description
5,2011-01-11,index,,
5,2011-01-16,compare,,
5,2011-01-18,compare,1,


6,2011-01-01,index,,
6,2011-01-06,compare,1,

6,2011-01-11,index,,the sum brings them below 1 again
6,2011-01-16,compare,1,
6,2011-01-17,compare,-1,



7,2010-01-01/2011-01-01,index,,
7,2011-01-06,compare,1,
7,2011-01-08,compare,1,
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
result,dates
2,{2011-01-01/2011-01-01}
4,"{2011-01-01/2011-01-01,2011-01-11/2011-01-11}"
7,{2010-01-01/2011-01-01}
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ pid,datum,value,sum,description
4,2011-01-16,compare,0,
4,2011-01-18,compare,1,


7,2011-01-01/2011-01-10,index,,this one is weird: the earliest day
7,2011-01-06,compare,1,
7,2011-01-08,compare,1,
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
result,dates
1,{2011-01-01/2011-01-01}
3,{2011-01-01/2011-01-01}
7,{2011-01-01/2011-01-10}
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ pid,datum,value,sum,description
5,2011-01-16,compare,1,
5,2011-01-18,compare,1,


7,2010-01-01/2011-01-01,index,,this one is weird: the latest day
7,2011-01-06,compare,1,
7,2011-01-08,compare,1,
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
result,dates
1,{2011-01-01/2011-01-01}
5,{2011-01-11/2011-01-11}
5,{2011-01-11/2011-01-11}
7,{2010-01-01/2011-01-01}
16 changes: 16 additions & 0 deletions backend/src/test/resources/tests/query/TEMPORAL/AND/content.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
pid,datum,value,sum
00,2011-01-01,index,
01,2011-01-01,compare,

1,2011-01-01,index,
1,2011-01-05/2011-01-10,compare_1,1
1,2011-01-05/2011-01-10,compare_2,1

2,2011-01-01,index,
2,2011-01-05/2011-01-10,compare_1,1
2,2011-01-01/2011-01-10,compare_2,1

3,2011-01-01,index,
3,2011-01-05/2011-01-10,compare_1,1
3,2011-01-05/2011-01-10,compare_2,2
3,2011-01-01/2011-01-01,compare_2,-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
result,dates
1,{2011-01-01/2011-01-01}
2,{2011-01-01/2011-01-01}
155 changes: 155 additions & 0 deletions backend/src/test/resources/tests/query/TEMPORAL/AND/query.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"type": "QUERY_TEST",
"label": "Temporal Test AND in compare",
"expectedCsv": "tests/query/TEMPORAL/AND/expected.csv",
"query": {
"type": "CONCEPT_QUERY",
"root": {
"type": "TEMPORAL",
"indexSelector": "ALL",
"compareSelector": "ALL",
"mode": {
"type": "AFTER",
"days": {
"min": 0,
"max": 10
}
},
"index": {
"ids": [
"concept"
],
"type": "CONCEPT",
"tables": [
{
"id": "concept.connector",
"filters": [
{
"filter": "concept.connector.filter",
"type": "SELECT",
"value": "index"
}
]
}
]
},
"compare": {
"type" : "AND",
"children" : [
{
"ids": [
"concept"
],
"type": "CONCEPT",
"tables": [
{
"id": "concept.connector",
"selects": [
],
"filters": [
{
"filter": "concept.connector.filter",
"type": "SELECT",
"value": "compare_1"
},
{
"filter": "concept.connector.sum",
"type": "INTEGER_RANGE",
"value": {
"min": 1,
"max": 1
}
}
]
}
]
},
{
"ids": [
"concept"
],
"type": "CONCEPT",
"tables": [
{
"id": "concept.connector",
"selects": [
],
"filters": [
{
"filter": "concept.connector.filter",
"type": "SELECT",
"value": "compare_2"
},
{
"filter": "concept.connector.sum",
"type": "INTEGER_RANGE",
"value": {
"min": 1,
"max": 1
}
}
]
}
]
}
]
}
}
},
"concepts": [
{
"name": "concept",
"type": "TREE",
"connectors": [
{
"name": "connector",
"table": "table",
"validityDates": {
"name": "datum",
"column": "table.datum"
},
"selects": [
],
"filters": [
{
"name": "filter",
"column": "table.value",
"type": "SINGLE_SELECT"
},
{
"name": "sum",
"column": "table.sum",
"type": "SUM"
}
]
}
]
}
],
"content": {
"tables": [
{
"csv": "tests/query/TEMPORAL/AND/content.csv",
"name": "table",
"primaryColumn": {
"name": "pid",
"type": "STRING"
},
"columns": [
{
"name": "datum",
"type": "DATE_RANGE"
},
{
"name": "value",
"type": "STRING"
},
{
"name": "sum",
"type": "INTEGER"
}
]
}
]
}
}
Loading