Skip to content

Commit f6eaef3

Browse files
Bin command big5 queries (#4163) (#4677)
* Bin command big5 queries * update IT * fix * remove tests --------- (cherry picked from commit 945235a) Signed-off-by: Kai Huang <ahkcs@amazon.com> Signed-off-by: Kai Huang <105710027+ahkcs@users.noreply.github.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 6ed2c01 commit f6eaef3

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

integ-test/src/test/java/org/opensearch/sql/calcite/big5/CalcitePPLBig5IT.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ public void init() throws Exception {
2020
}
2121

2222
@Test
23+
public void bin_bins() throws IOException {
24+
String ppl = sanitize(loadFromFile("big5/queries/bin_bins.ppl"));
25+
timing(summary, "bin_bins", ppl);
26+
}
27+
28+
@Test
29+
public void bin_span_log() throws IOException {
30+
String ppl = sanitize(loadFromFile("big5/queries/bin_span_log.ppl"));
31+
timing(summary, "bin_span_log", ppl);
32+
}
33+
34+
@Test
35+
public void bin_span_time() throws IOException {
36+
String ppl = sanitize(loadFromFile("big5/queries/bin_span_time.ppl"));
37+
timing(summary, "bin_span_time", ppl);
38+
}
39+
2340
public void coalesce_nonexistent_field_fallback() throws IOException {
2441
String ppl = sanitize(loadFromFile("big5/queries/coalesce_nonexistent_field_fallback.ppl"));
2542
timing(summary, "coalesce_nonexistent_field_fallback", ppl);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source = big5
2+
| bin `metrics.size` bins=5
3+
| head 10
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source = big5
2+
| bin `metrics.size` span=log10
3+
| head 10
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source = big5
2+
| bin `@timestamp` span=1h
3+
| head 10

0 commit comments

Comments
 (0)