Skip to content

Commit 1a6b9f3

Browse files
End-to-End Async Query API PPL tests (#1036)
Signed-off-by: Norman Jordan <[email protected]>
1 parent 77da4a7 commit 1a6b9f3

File tree

449 files changed

+18675
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+18675
-5
lines changed

docker/integ-test/docker-compose.yml

+6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ services:
4444
- type: bind
4545
source: ../../$FLINT_JAR
4646
target: /opt/bitnami/spark/jars/flint-spark-integration.jar
47+
- type: bind
48+
source: ../../$SQL_APP_JAR
49+
target: /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar
4750
healthcheck:
4851
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
4952
interval: 1m
@@ -87,6 +90,9 @@ services:
8790
- type: bind
8891
source: ../../$FLINT_JAR
8992
target: /opt/bitnami/spark/jars/flint-spark-integration.jar
93+
- type: bind
94+
source: ../../$SQL_APP_JAR
95+
target: /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar
9096
networks:
9197
- opensearch-net
9298
depends_on:

docker/integ-test/spark-submit/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ENV SQL_APP_JAR $SQL_APP_JAR
1212
COPY docker/integ-test/spark/spark-defaults.conf /opt/bitnami/spark/conf/spark-defaults.conf
1313
COPY ${FLINT_JAR} /opt/bitnami/spark/jars/flint-spark-integration.jar
1414
COPY ${PPL_JAR} /opt/bitnami/spark/jars/ppl-spark-integration.jar
15+
COPY ${SQL_APP_JAR} /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar
1516

1617
USER root
1718
RUN mkdir /app
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup 1 status | fields @timestamp, clientip, status, size | head 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"status": "SUCCESS",
3+
"schema": [
4+
{
5+
"name": "@timestamp",
6+
"type": "timestamp_ntz"
7+
},
8+
{
9+
"name": "clientip",
10+
"type": "string"
11+
},
12+
{
13+
"name": "status",
14+
"type": "long"
15+
},
16+
{
17+
"name": "size",
18+
"type": "long"
19+
}
20+
],
21+
"datarows": [
22+
[
23+
"2023-10-01T10:00:00.000",
24+
"40.135.0.0",
25+
200,
26+
24736
27+
],
28+
[
29+
"2023-10-01T10:20:00.000",
30+
"247.37.0.0",
31+
304,
32+
0
33+
]
34+
],
35+
"total": 2,
36+
"size": 2
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup status, size | head 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"status": "SUCCESS",
3+
"schema": [
4+
{
5+
"name": "@timestamp",
6+
"type": "timestamp_ntz"
7+
},
8+
{
9+
"name": "year",
10+
"type": "long"
11+
},
12+
{
13+
"name": "month",
14+
"type": "long"
15+
},
16+
{
17+
"name": "day",
18+
"type": "long"
19+
},
20+
{
21+
"name": "clientip",
22+
"type": "string"
23+
},
24+
{
25+
"name": "request",
26+
"type": "string"
27+
},
28+
{
29+
"name": "status",
30+
"type": "long"
31+
},
32+
{
33+
"name": "size",
34+
"type": "long"
35+
}
36+
],
37+
"datarows": [
38+
[
39+
"2023-10-01T10:15:00.000",
40+
2023,
41+
10,
42+
1,
43+
"247.37.0.0",
44+
"GET /french/splash_inet.html HTTP/1.0",
45+
200,
46+
3781
47+
],
48+
[
49+
"2023-10-01T10:00:00.000",
50+
2023,
51+
10,
52+
1,
53+
"40.135.0.0",
54+
"GET /images/hm_bg.jpg HTTP/1.0",
55+
200,
56+
24736
57+
],
58+
[
59+
"2023-10-01T10:20:00.000",
60+
2023,
61+
10,
62+
1,
63+
"247.37.0.0",
64+
"GET /images/hm_nbg.jpg HTTP/1.0",
65+
304,
66+
0
67+
]
68+
],
69+
"total": 3,
70+
"size": 3
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup 1 status keepempty=true | head 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"status": "SUCCESS",
3+
"schema": [
4+
{
5+
"name": "@timestamp",
6+
"type": "timestamp_ntz"
7+
},
8+
{
9+
"name": "year",
10+
"type": "long"
11+
},
12+
{
13+
"name": "month",
14+
"type": "long"
15+
},
16+
{
17+
"name": "day",
18+
"type": "long"
19+
},
20+
{
21+
"name": "clientip",
22+
"type": "string"
23+
},
24+
{
25+
"name": "request",
26+
"type": "string"
27+
},
28+
{
29+
"name": "status",
30+
"type": "long"
31+
},
32+
{
33+
"name": "size",
34+
"type": "long"
35+
}
36+
],
37+
"datarows": [
38+
[
39+
"2023-10-01T10:00:00.000",
40+
2023,
41+
10,
42+
1,
43+
"40.135.0.0",
44+
"GET /images/hm_bg.jpg HTTP/1.0",
45+
200,
46+
24736
47+
],
48+
[
49+
"2023-10-01T10:20:00.000",
50+
2023,
51+
10,
52+
1,
53+
"247.37.0.0",
54+
"GET /images/hm_nbg.jpg HTTP/1.0",
55+
304,
56+
0
57+
]
58+
],
59+
"total": 2,
60+
"size": 2
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup status, size keepempty=true | head 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"status": "SUCCESS",
3+
"schema": [
4+
{
5+
"name": "@timestamp",
6+
"type": "timestamp_ntz"
7+
},
8+
{
9+
"name": "year",
10+
"type": "long"
11+
},
12+
{
13+
"name": "month",
14+
"type": "long"
15+
},
16+
{
17+
"name": "day",
18+
"type": "long"
19+
},
20+
{
21+
"name": "clientip",
22+
"type": "string"
23+
},
24+
{
25+
"name": "request",
26+
"type": "string"
27+
},
28+
{
29+
"name": "status",
30+
"type": "long"
31+
},
32+
{
33+
"name": "size",
34+
"type": "long"
35+
}
36+
],
37+
"datarows": [
38+
[
39+
"2023-10-01T10:15:00.000",
40+
2023,
41+
10,
42+
1,
43+
"247.37.0.0",
44+
"GET /french/splash_inet.html HTTP/1.0",
45+
200,
46+
3781
47+
],
48+
[
49+
"2023-10-01T10:00:00.000",
50+
2023,
51+
10,
52+
1,
53+
"40.135.0.0",
54+
"GET /images/hm_bg.jpg HTTP/1.0",
55+
200,
56+
24736
57+
],
58+
[
59+
"2023-10-01T10:20:00.000",
60+
2023,
61+
10,
62+
1,
63+
"247.37.0.0",
64+
"GET /images/hm_nbg.jpg HTTP/1.0",
65+
304,
66+
0
67+
]
68+
],
69+
"total": 3,
70+
"size": 3
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup 2 status | head 10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"status": "SUCCESS",
3+
"schema": [
4+
{
5+
"name": "@timestamp",
6+
"type": "timestamp_ntz"
7+
},
8+
{
9+
"name": "year",
10+
"type": "long"
11+
},
12+
{
13+
"name": "month",
14+
"type": "long"
15+
},
16+
{
17+
"name": "day",
18+
"type": "long"
19+
},
20+
{
21+
"name": "clientip",
22+
"type": "string"
23+
},
24+
{
25+
"name": "request",
26+
"type": "string"
27+
},
28+
{
29+
"name": "status",
30+
"type": "long"
31+
},
32+
{
33+
"name": "size",
34+
"type": "long"
35+
}
36+
],
37+
"datarows": [
38+
[
39+
"2023-10-01T10:00:00.000",
40+
2023,
41+
10,
42+
1,
43+
"40.135.0.0",
44+
"GET /images/hm_bg.jpg HTTP/1.0",
45+
200,
46+
24736
47+
],
48+
[
49+
"2023-10-01T10:05:00.000",
50+
2023,
51+
10,
52+
1,
53+
"232.0.0.0",
54+
"GET /images/hm_bg.jpg HTTP/1.0",
55+
200,
56+
24736
57+
],
58+
[
59+
"2023-10-01T10:20:00.000",
60+
2023,
61+
10,
62+
1,
63+
"247.37.0.0",
64+
"GET /images/hm_nbg.jpg HTTP/1.0",
65+
304,
66+
0
67+
]
68+
],
69+
"total": 3,
70+
"size": 3
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source = mys3.default.http_logs | dedup 2 status, size | head 10

0 commit comments

Comments
 (0)