From 7667e55596347aa683ce24318ec333fc6d6b33d4 Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Thu, 28 Dec 2023 14:56:42 -0800 Subject: [PATCH] Fix broken UT Signed-off-by: Chen Dai --- .../flint/spark/skipping/FlintSparkSkippingIndexSuite.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flint-spark-integration/src/test/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndexSuite.scala b/flint-spark-integration/src/test/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndexSuite.scala index 9760e8cd2..241b0fd84 100644 --- a/flint-spark-integration/src/test/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndexSuite.scala +++ b/flint-spark-integration/src/test/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndexSuite.scala @@ -5,6 +5,8 @@ package org.opensearch.flint.spark.skipping +import java.util.Collections + import scala.collection.JavaConverters.mapAsJavaMapConverter import org.json4s.native.JsonMethods.parse @@ -39,6 +41,7 @@ class FlintSparkSkippingIndexSuite extends FlintSuite { test("get index metadata") { val indexCol = mock[FlintSparkSkippingStrategy] when(indexCol.kind).thenReturn(SkippingKind.PARTITION) + when(indexCol.parameters).thenReturn(Map.empty[String, String]) when(indexCol.columnName).thenReturn("test_field") when(indexCol.columnType).thenReturn("integer") when(indexCol.outputSchema()).thenReturn(Map("test_field" -> "integer")) @@ -51,6 +54,7 @@ class FlintSparkSkippingIndexSuite extends FlintSuite { metadata.indexedColumns shouldBe Array( Map( "kind" -> SkippingKind.PARTITION.toString, + "parameters" -> Collections.emptyMap(), "columnName" -> "test_field", "columnType" -> "integer").asJava) }