From daf11fa84a403056a3dbdb7b024587dec1f5229b Mon Sep 17 00:00:00 2001 From: Kenrick Yap Date: Wed, 18 Dec 2024 00:17:07 +0000 Subject: [PATCH] Fixed integration tests Signed-off-by: Kenrick Yap --- .../org/opensearch/flint/spark/FlintSparkSuite.scala | 8 ++++---- .../flint/spark/ppl/FlintSparkPPLGeoipITSuite.scala | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/integ-test/src/integration/scala/org/opensearch/flint/spark/FlintSparkSuite.scala b/integ-test/src/integration/scala/org/opensearch/flint/spark/FlintSparkSuite.scala index 36d0c6a7d..b9b9e6f1c 100644 --- a/integ-test/src/integration/scala/org/opensearch/flint/spark/FlintSparkSuite.scala +++ b/integ-test/src/integration/scala/org/opensearch/flint/spark/FlintSparkSuite.scala @@ -806,8 +806,8 @@ trait FlintSparkSuite extends QueryTest with FlintSuite with OpenSearchSuite wit | city_name STRING, | time_zone STRING, | location STRING, - | ip_range_start BIGINT, - | ip_range_end BIGINT, + | ip_range_start DECIMAL(38,0), + | ip_range_end DECIMAL(38,0), | ipv4 BOOLEAN | ) | USING $tableType $tableOptions @@ -830,9 +830,9 @@ trait FlintSparkSuite extends QueryTest with FlintSuite with OpenSearchSuite wit | 1123655167, | true | ), - | VALUES ( + | ( | '2a09:bac2:19f8::/45', - | `'CA', + | 'CA', | 'Canada', | 'North America', | 'PE', diff --git a/integ-test/src/integration/scala/org/opensearch/flint/spark/ppl/FlintSparkPPLGeoipITSuite.scala b/integ-test/src/integration/scala/org/opensearch/flint/spark/ppl/FlintSparkPPLGeoipITSuite.scala index 3e2728553..9eac24223 100644 --- a/integ-test/src/integration/scala/org/opensearch/flint/spark/ppl/FlintSparkPPLGeoipITSuite.scala +++ b/integ-test/src/integration/scala/org/opensearch/flint/spark/ppl/FlintSparkPPLGeoipITSuite.scala @@ -41,10 +41,11 @@ class FlintSparkPPLGeoipITSuite // Retrieve the results val results: Array[Row] = frame.collect() + // Define the expected results val expectedResults: Array[Row] = Array( - Row("66.249.157.90", Row("JM", "Jamaica", "North America", 14, "Saint Catherine Parish", "Portmore", "America/Jamaica", "17.9686, -76.8827")), - Row("2a09:bac2:19f8:2ac3::", Row("CA", "Canada", "North America", "PE", "Prince Edward Island", "Charlottetown", "America/Halifax", "46.2396, -63.1355")) + Row("66.249.157.90", Row("JM", "Jamaica", "North America", "14", "Saint Catherine Parish", "Portmore", "America/Jamaica", "17.9686,-76.8827")), + Row("2a09:bac2:19f8:2ac3::", Row("CA", "Canada", "North America", "PE", "Prince Edward Island", "Charlottetown", "America/Halifax", "46.2396,-63.1355")) ) // Compare the results