diff --git a/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanSimpleTranslatorTestSuite.scala b/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanSimpleTranslatorTestSuite.scala index 1db4ad4b5..bff430e5b 100644 --- a/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanSimpleTranslatorTestSuite.scala +++ b/ppl-spark-integration/src/test/scala/org/opensearch/flint/spark/ppl/PPLLogicalPlanSimpleTranslatorTestSuite.scala @@ -30,7 +30,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite private val planTrnasformer = new CatalystQueryPlanVisitor() private val pplParser = new PPLSyntaxParser() - test("Find What are the average prices for different types of properties") { + ignore("Find What are the average prices for different types of properties") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | stats avg(price) by property_type", false), context) // equivalent to SELECT property_type, AVG(price) FROM housing_properties GROUP BY property_type @@ -51,7 +51,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find the top 10 most expensive properties in California, including their addresses, prices, and cities") { + ignore("Find the top 10 most expensive properties in California, including their addresses, prices, and cities") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | where state = \"CA\" | fields address, price, city | sort - price | head 10", false), context) // Equivalent SQL: SELECT address, price, city FROM housing_properties WHERE state = 'CA' ORDER BY price DESC LIMIT 10 @@ -73,7 +73,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find the average price per unit of land space for properties in different cities") { + ignore("Find the average price per unit of land space for properties in different cities") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | where land_space > 0 | eval price_per_land_unit = price / land_space | stats avg(price_per_land_unit) by city", false), context) // SQL: SELECT city, AVG(price / land_space) AS avg_price_per_land_unit FROM housing_properties WHERE land_space > 0 GROUP BY city @@ -100,7 +100,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find the houses posted in the last month, how many are still for sale") { + ignore("Find the houses posted in the last month, how many are still for sale") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "search source=housing_properties | where listing_age >= 0 | where listing_age < 30 | stats count() by property_status", false), context) // SQL: SELECT property_status, COUNT(*) FROM housing_properties WHERE listing_age >= 0 AND listing_age < 30 GROUP BY property_status; @@ -125,7 +125,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find all the houses listed by agency Compass in decreasing price order. Also provide only price, address and agency name information.") { + ignore("Find all the houses listed by agency Compass in decreasing price order. Also provide only price, address and agency name information.") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | where match( agency_name , \"Compass\" ) | fields address , agency_name , price | sort - price ", false), context) // SQL: SELECT address, agency_name, price FROM housing_properties WHERE agency_name LIKE '%Compass%' ORDER BY price DESC @@ -148,7 +148,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find details of properties owned by Zillow with at least 3 bedrooms and 2 bathrooms") { + ignore("Find details of properties owned by Zillow with at least 3 bedrooms and 2 bathrooms") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | where is_owned_by_zillow = 1 and bedroom_number >= 3 and bathroom_number >= 2 | fields address, price, city, listing_age", false), context) // SQL:SELECT address, price, city, listing_age FROM housing_properties WHERE is_owned_by_zillow = 1 AND bedroom_number >= 3 AND bathroom_number >= 2; @@ -179,7 +179,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find which cities in WA state have the largest number of houses for sale") { + ignore("Find which cities in WA state have the largest number of houses for sale") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = housing_properties | where property_status = 'FOR_SALE' and state = 'WA' | stats count() as count by city | sort -count | head", false), context) // SQL : SELECT city, COUNT(*) as count FROM housing_properties WHERE property_status = 'FOR_SALE' AND state = 'WA' GROUP BY city ORDER BY count DESC LIMIT 10; @@ -214,7 +214,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find the top 5 referrers for the '/' path in apache access logs") { + ignore("Find the top 5 referrers for the '/' path in apache access logs") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = access_logs | where path = \"/\" | top 5 referer", false), context) /* @@ -249,7 +249,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find access paths by status code. How many error responses (status code 400 or higher) are there for each access path in the Apache access logs") { + ignore("Find access paths by status code. How many error responses (status code 400 or higher) are there for each access path in the Apache access logs") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = access_logs | where status >= 400 | stats count() by path, status", false), context) /* @@ -278,7 +278,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find max size of nginx access requests for every 15min") { + ignore("Find max size of nginx access requests for every 15min") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = access_logs | stats max(size) by span( request_time , 15m) ", false), context) //SQL: SELECT MAX(size) AS max_size, floor(request_time / 900) AS time_span FROM access_logs GROUP BY time_span; @@ -298,7 +298,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find nginx logs with non 2xx status code and url containing 'products'") { + ignore("Find nginx logs with non 2xx status code and url containing 'products'") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = sso_logs-nginx-* | where match(http.url, 'products') and http.response.status_code >= \"300\"", false), context) //SQL : SELECT MAX(size) AS max_size, floor(request_time / 900) AS time_span FROM access_logs GROUP BY time_span; @@ -319,7 +319,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find What are the details (URL, response status code, timestamp, source address) of events in the nginx logs where the response status code is 400 or higher") { + ignore("Find What are the details (URL, response status code, timestamp, source address) of events in the nginx logs where the response status code is 400 or higher") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = sso_logs-nginx-* | where http.response.status_code >= \"400\" | fields http.url, http.response.status_code, @timestamp, communication.source.address", false), context) // SQL : SELECT http.url, http.response.status_code, @timestamp, communication.source.address FROM sso_logs-nginx-* WHERE http.response.status_code >= 400; @@ -343,7 +343,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find What are the average and max http response sizes, grouped by request method, for access events in the nginx logs") { + ignore("Find What are the average and max http response sizes, grouped by request method, for access events in the nginx logs") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = sso_logs-nginx-* | where event.name = \"access\" | stats avg(http.response.bytes), max(http.response.bytes) by http.request.method", false), context) //SQL : SELECT AVG(http.response.bytes) AS avg_size, MAX(http.response.bytes) AS max_size, http.request.method FROM sso_logs-nginx-* WHERE event.name = 'access' GROUP BY http.request.method; @@ -365,7 +365,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite assertEquals(logPlan, "???") } - test("Find flights from which carrier has the longest average delay for flights over 6k miles") { + ignore("Find flights from which carrier has the longest average delay for flights over 6k miles") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = opensearch_dashboards_sample_data_flights | where DistanceMiles > 6000 | stats avg(FlightDelayMin) by Carrier | sort -`avg(FlightDelayMin)` | head 1", false), context) //SQL: SELECT AVG(FlightDelayMin) AS avg_delay, Carrier FROM opensearch_dashboards_sample_data_flights WHERE DistanceMiles > 6000 GROUP BY Carrier ORDER BY avg_delay DESC LIMIT 1; @@ -395,7 +395,7 @@ class PPLLogicalPlanSimpleTranslatorTestSuite } - test("Find What's the average ram usage of windows machines over time aggregated by 1 week") { + ignore("Find What's the average ram usage of windows machines over time aggregated by 1 week") { val context = new CatalystPlanContext val logPlan = planTrnasformer.visit(plan(pplParser, "source = opensearch_dashboards_sample_data_logs | where match(machine.os, 'win') | stats avg(machine.ram) by span(timestamp,1w)", false), context) //SQL : SELECT AVG(machine.ram) AS avg_ram, floor(extract(epoch from timestamp) / 604800) AS week_span FROM opensearch_dashboards_sample_data_logs WHERE machine.os LIKE '%win%' GROUP BY week_span;