Skip to content

Commit

Permalink
End-to-End Async Query API PPL tests (#1036)
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Jordan <[email protected]>
  • Loading branch information
normanj-bitquill authored Feb 7, 2025
1 parent 77da4a7 commit 1a6b9f3
Show file tree
Hide file tree
Showing 449 changed files with 18,675 additions and 5 deletions.
6 changes: 6 additions & 0 deletions docker/integ-test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ services:
- type: bind
source: ../../$FLINT_JAR
target: /opt/bitnami/spark/jars/flint-spark-integration.jar
- type: bind
source: ../../$SQL_APP_JAR
target: /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 1m
Expand Down Expand Up @@ -87,6 +90,9 @@ services:
- type: bind
source: ../../$FLINT_JAR
target: /opt/bitnami/spark/jars/flint-spark-integration.jar
- type: bind
source: ../../$SQL_APP_JAR
target: /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar
networks:
- opensearch-net
depends_on:
Expand Down
1 change: 1 addition & 0 deletions docker/integ-test/spark-submit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ENV SQL_APP_JAR $SQL_APP_JAR
COPY docker/integ-test/spark/spark-defaults.conf /opt/bitnami/spark/conf/spark-defaults.conf
COPY ${FLINT_JAR} /opt/bitnami/spark/jars/flint-spark-integration.jar
COPY ${PPL_JAR} /opt/bitnami/spark/jars/ppl-spark-integration.jar
COPY ${SQL_APP_JAR} /opt/bitnami/spark/jars/opensearch-spark-sql-application.jar

USER root
RUN mkdir /app
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup 1 status | fields @timestamp, clientip, status, size | head 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"status": "SUCCESS",
"schema": [
{
"name": "@timestamp",
"type": "timestamp_ntz"
},
{
"name": "clientip",
"type": "string"
},
{
"name": "status",
"type": "long"
},
{
"name": "size",
"type": "long"
}
],
"datarows": [
[
"2023-10-01T10:00:00.000",
"40.135.0.0",
200,
24736
],
[
"2023-10-01T10:20:00.000",
"247.37.0.0",
304,
0
]
],
"total": 2,
"size": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup status, size | head 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"status": "SUCCESS",
"schema": [
{
"name": "@timestamp",
"type": "timestamp_ntz"
},
{
"name": "year",
"type": "long"
},
{
"name": "month",
"type": "long"
},
{
"name": "day",
"type": "long"
},
{
"name": "clientip",
"type": "string"
},
{
"name": "request",
"type": "string"
},
{
"name": "status",
"type": "long"
},
{
"name": "size",
"type": "long"
}
],
"datarows": [
[
"2023-10-01T10:15:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /french/splash_inet.html HTTP/1.0",
200,
3781
],
[
"2023-10-01T10:00:00.000",
2023,
10,
1,
"40.135.0.0",
"GET /images/hm_bg.jpg HTTP/1.0",
200,
24736
],
[
"2023-10-01T10:20:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /images/hm_nbg.jpg HTTP/1.0",
304,
0
]
],
"total": 3,
"size": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup 1 status keepempty=true | head 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"status": "SUCCESS",
"schema": [
{
"name": "@timestamp",
"type": "timestamp_ntz"
},
{
"name": "year",
"type": "long"
},
{
"name": "month",
"type": "long"
},
{
"name": "day",
"type": "long"
},
{
"name": "clientip",
"type": "string"
},
{
"name": "request",
"type": "string"
},
{
"name": "status",
"type": "long"
},
{
"name": "size",
"type": "long"
}
],
"datarows": [
[
"2023-10-01T10:00:00.000",
2023,
10,
1,
"40.135.0.0",
"GET /images/hm_bg.jpg HTTP/1.0",
200,
24736
],
[
"2023-10-01T10:20:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /images/hm_nbg.jpg HTTP/1.0",
304,
0
]
],
"total": 2,
"size": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup status, size keepempty=true | head 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"status": "SUCCESS",
"schema": [
{
"name": "@timestamp",
"type": "timestamp_ntz"
},
{
"name": "year",
"type": "long"
},
{
"name": "month",
"type": "long"
},
{
"name": "day",
"type": "long"
},
{
"name": "clientip",
"type": "string"
},
{
"name": "request",
"type": "string"
},
{
"name": "status",
"type": "long"
},
{
"name": "size",
"type": "long"
}
],
"datarows": [
[
"2023-10-01T10:15:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /french/splash_inet.html HTTP/1.0",
200,
3781
],
[
"2023-10-01T10:00:00.000",
2023,
10,
1,
"40.135.0.0",
"GET /images/hm_bg.jpg HTTP/1.0",
200,
24736
],
[
"2023-10-01T10:20:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /images/hm_nbg.jpg HTTP/1.0",
304,
0
]
],
"total": 3,
"size": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup 2 status | head 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"status": "SUCCESS",
"schema": [
{
"name": "@timestamp",
"type": "timestamp_ntz"
},
{
"name": "year",
"type": "long"
},
{
"name": "month",
"type": "long"
},
{
"name": "day",
"type": "long"
},
{
"name": "clientip",
"type": "string"
},
{
"name": "request",
"type": "string"
},
{
"name": "status",
"type": "long"
},
{
"name": "size",
"type": "long"
}
],
"datarows": [
[
"2023-10-01T10:00:00.000",
2023,
10,
1,
"40.135.0.0",
"GET /images/hm_bg.jpg HTTP/1.0",
200,
24736
],
[
"2023-10-01T10:05:00.000",
2023,
10,
1,
"232.0.0.0",
"GET /images/hm_bg.jpg HTTP/1.0",
200,
24736
],
[
"2023-10-01T10:20:00.000",
2023,
10,
1,
"247.37.0.0",
"GET /images/hm_nbg.jpg HTTP/1.0",
304,
0
]
],
"total": 3,
"size": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source = mys3.default.http_logs | dedup 2 status, size | head 10
Loading

0 comments on commit 1a6b9f3

Please sign in to comment.