Skip to content

Commit

Permalink
[small] fix 1 test expected answers (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
trzysiek authored Nov 11, 2024
1 parent 5a41028 commit 32af378
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 37 deletions.
3 changes: 0 additions & 3 deletions quesma/queryparser/pancake_sql_query_generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ func TestPancakeQueryGeneration(t *testing.T) {
if test.TestName == "multiple buckets_path(file:clients/clover,nr:1)" {
t.Skip("This needs fixing ASAP, easy to fix")
}
if test.TestName == "Clover(file:clients/clover,nr:6)" {
t.Skip("answers are fine, need to update test")
}

if test.TestName == "max_bucket. Reproduce: Visualize -> Line: Metrics: Max Bucket (Bucket: Filters, Metric: Sum)(file:opensearch-visualize/pipeline_agg_req,nr:20)" ||
test.TestName == "complex max_bucket. Reproduce: Visualize -> Line: Metrics: Max Bucket (Bucket: Filters, Metric: Sum), Buckets: Split chart: Rows -> Range(file:opensearch-visualize/pipeline_agg_req,nr:21)" {
Expand Down
96 changes: 62 additions & 34 deletions quesma/testdata/clients/clover.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,41 +1007,69 @@ var CloverTests = []testdata.AggregationTestCase{
"total": 1
},
"aggregations": {
"sampler": {
"doc_count": 4675,
"eventRate": {
"buckets": [
{
"doc_count": 442,
"key": 1726351200000,
"key_as_string": "2024-09-14T22:00:00.000"
},
{
"doc_count": 0,
"key": 1726353000000,
"key_as_string": "2024-09-14T22:30:00.000"
},
{
"doc_count": 0,
"key": 1726354800000,
"key_as_string": "2024-09-14T23:00:00.000"
},
{
"doc_count": 0,
"key": 1726356600000,
"key_as_string": "2024-09-14T23:30:00.000"
},
{
"doc_count": 0,
"key": 1726356600000,
"key_as_string": "2024-09-15T00:00:00.000"
},
{
"doc_count": 1,
"key": 1728777600000,
"key_as_string": "2024-09-15T00:30:00.000"
"q": {
"meta": {
"type": "split"
},
"buckets": {
"!str_field:CRASH": {
"doc_count": 4675,
"time_buckets": {
"meta": {
"type": "time_buckets"
},
"buckets": [
{
"doc_count": 442,
"key": 1726351200000,
"key_as_string": "2024-09-14T22:00:00.000",
"sum(count)": {
"value": 442
}
},
{
"doc_count": 0,
"key": 1726353000000,
"key_as_string": "2024-09-14T22:30:00.000",
"sum(count)": {
"value": null
}
},
{
"doc_count": 0,
"key": 1726354800000,
"key_as_string": "2024-09-14T23:00:00.000",
"sum(count)": {
"value": null
}
},
{
"doc_count": 0,
"key": 1726356600000,
"key_as_string": "2024-09-14T23:30:00.000",
"sum(count)": {
"value": null
}
},
{
"doc_count": 0,
"key": 1726358400000,
"key_as_string": "2024-09-15T00:00:00.000",
"sum(count)": {
"value": null
}
},
{
"doc_count": 1,
"key": 1726360200000,
"key_as_string": "2024-09-15T00:30:00.000",
"sum(count)": {
"value": 1
}
}
]
}
]
}
}
}
},
Expand Down

0 comments on commit 32af378

Please sign in to comment.