diff --git a/integ-test/src/test/python/http_logs/results/q8.json b/integ-test/src/test/python/http_logs/results/q8.json deleted file mode 100644 index f39b67c58..000000000 --- a/integ-test/src/test/python/http_logs/results/q8.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "data": { - "ok": true, - "resp": { - "status": "SUCCESS", - "schema": [ - { - "name": "@timestamp", - "type": "date" - }, - { - "name": "clientip", - "type": "string" - }, - { - "name": "request", - "type": "string" - }, - { - "name": "status", - "type": "integer" - }, - { - "name": "size", - "type": "integer" - }, - { - "name": "year", - "type": "integer" - }, - { - "name": "month", - "type": "integer" - }, - { - "name": "day", - "type": "integer" - } - ], - "datarows": [ - [ - "1998-06-14T19:59:55.000Z", - "185.163.25.0", - "GET /images/comp_bg2_hm.gif HTTP/1.1", - 404, - 340, - 1998, - 6, - 14 - ], - [ - "1998-06-14T19:59:55.000Z", - "161.62.26.0", - "GET /images/comp_bg2_hm.gif HTTP/1.0", - 404, - 343, - 1998, - 6, - 14 - ], - [ - "1998-06-14T19:59:55.000Z", - "63.158.15.0", - "GET /images/comp_bg2_hm.gif HTTP/1.1", - 404, - 335, - 1998, - 6, - 14 - ], - [ - "1998-06-14T19:59:55.000Z", - "190.10.13.0", - "GET /images/comp_bg2_hm.gif HTTP/1.1", - 404, - 335, - 1998, - 6, - 14 - ], - [ - "1998-06-14T19:59:53.000Z", - "28.87.6.0", - "GET /images/comp_bg2_hm.gif HTTP/1.0", - 404, - 349, - 1998, - 6, - 14 - ] - ], - "total": 5, - "size": 5 - } - } -} \ No newline at end of file diff --git a/integ-test/src/test/python/http_logs/sql/q8.sql b/integ-test/src/test/python/http_logs/sql/q8.sql deleted file mode 100644 index 5f7f6d53c..000000000 --- a/integ-test/src/test/python/http_logs/sql/q8.sql +++ /dev/null @@ -1,7 +0,0 @@ -Explain SELECT - day, - status - FROM mys3.default.http_logs_plain - WHERE status >= 400 - GROUP BY day, status - LIMIT 100; diff --git a/integ-test/src/test/python/run_sanity.sh b/integ-test/src/test/python/run_sanity.sh index 9ebc35d45..a300fdb02 100755 --- a/integ-test/src/test/python/run_sanity.sh +++ b/integ-test/src/test/python/run_sanity.sh @@ -1,33 +1,9 @@ #!/bin/bash # Set the environment variable for the OpenSearch URL -export OPENSEARCH_URL="http://opensearch:9200" +export OPENSEARCH_URL="http://ec2-52-39-211-201.us-west-2.compute.amazonaws.com:9200" -# ASCII Art for OpenSearch Spark -cat << "EOF" - ______ _____ _____ _______ _____ - / __ \ |\ \ /\ \ /::\ \ /\ \ - / \/ /| \\ \ /::\____\ /::::\ \ /::\____\ - / // \\ \ /:::/ / /::::::\ \ /:::/ / - /__/\ \\ \| | __ /:::/ / /::::::::\ \ /:::/ / - \ \ \ \ __ | |/ \ /:::/ / /:::/~~\:::\ \ /:::/ / - \ \ \ / \ / /\ /:::/ / /:::/ \:::\ \ /:::/ / - \ \ \/ / / / /\/:::/ / /:::/ / \:::\ \ /:::/ / - \ \ / / /__ / / /:::/____/ /:::/____/ \:::\____\ /:::/ / - \___\| | |::::\______ / / \:::\ \ |:::| | |:::| | /:::/ / - \____| |::::| | | / \:::\ \ |:::|____| |:::| |/:::/____/ - | ~~ | | | / \:::\ \ \:::\ \ /:::/ / \:::\ \ - | | | | / \:::\ \ \:::\ \ /:::/ / \:::\ \ - |_____| |_|/ \:::\____\ \:::\ /:::/ / \:::\ \ - \::/ / \:::\__/:::/ / \:::\ \ - \/____/ \::::::::/ / \:::\ \ - ~~\::::::/ / \:::\ \ - \::::/ / \:::\____\ - \::/____/ \::/ / - ~~ \/____/ -EOF - # Check for command-line arguments run_tables="" run_queries="" diff --git a/integ-test/src/test/python/sanity.py b/integ-test/src/test/python/sanity.py index e6125da52..000ce4a21 100644 --- a/integ-test/src/test/python/sanity.py +++ b/integ-test/src/test/python/sanity.py @@ -5,6 +5,8 @@ import logging from datetime import datetime import argparse +import re + url = os.environ.get('OPENSEARCH_URL', "http://opensearch:9200") # Modify this line table_name = 'http_logs' @@ -261,6 +263,13 @@ def main(use_date, run_tables, run_queries): # Default to current date if no print_sanity_report() +def remove_field_identifiers(plan): + # Regular expression to find field identifiers (e.g., "day#8") + pattern = re.compile(r'\b(\w+)#\d+\b') + # Replace field identifiers with just the field name + modified_plan = pattern.sub(r'\1', plan) + return modified_plan + if __name__ == '__main__': # Initialize the argument parser parser = argparse.ArgumentParser(description='Run table queries and/or other queries.')