Skip to content

Commit

Permalink
Fix broken UT
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen committed Dec 28, 2023
1 parent 26b105e commit 7667e55
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"))
Expand All @@ -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)
}
Expand Down

0 comments on commit 7667e55

Please sign in to comment.