Skip to content

Commit

Permalink
Fix mistake when merge from main
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen committed Sep 29, 2023
1 parent 00a4c35 commit deeb633
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ class FlintSpark(val spark: SparkSession) {
throw new IllegalStateException(s"Flint index $indexName already exists")
}
} else {
flintClient.createIndex(indexName, index.metadata())
val metadata = index.metadata()
index.options.indexSettings().foreach(metadata.setIndexSettings)
flintClient.createIndex(indexName, metadata)
}

val metadata = index.metadata()
index.options.indexSettings().foreach(metadata.setIndexSettings)
flintClient.createIndex(indexName, metadata)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,12 @@ class FlintSparkSkippingIndexITSuite extends FlintSparkSuite {
| }
|""".stripMargin)

// Load index options from index mapping (verify OS index setting in SQL IT)
index.get.options.autoRefresh() shouldBe true
index.get.options.refreshInterval() shouldBe Some("1 Minute")
index.get.options.checkpointLocation() shouldBe Some("s3a://test/")
index.get.options.indexSettings() shouldBe
"{\"number_of_shards\": 3,\"number_of_replicas\": 2}"
Some("{\"number_of_shards\": 3,\"number_of_replicas\": 2}")
}

test("should not have ID column in index data") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class FlintSparkSkippingIndexSqlITSuite extends FlintSparkSuite {
| )
|""".stripMargin)

// Check if the index settings is set to OS index
// Check if the index setting option is set to OS index setting
val flintClient = new FlintOpenSearchClient(new FlintOptions(openSearchOptions.asJava))

implicit val formats: Formats = Serialization.formats(NoTypeHints)
Expand Down

0 comments on commit deeb633

Please sign in to comment.