Skip to content

Commit

Permalink
Add more IT
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen committed Mar 26, 2024
1 parent 9aa7194 commit 80312b5
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package org.opensearch.flint.spark

import org.opensearch.client.RequestOptions
import org.opensearch.client.indices.CreateIndexRequest
import org.opensearch.common.xcontent.XContentType
import org.opensearch.flint.spark.FlintSparkIndexOptions.OptionName.AUTO_REFRESH
import org.opensearch.flint.spark.covering.FlintSparkCoveringIndex
import org.opensearch.flint.spark.mv.FlintSparkMaterializedView
Expand Down Expand Up @@ -130,11 +131,26 @@ class FlintSparkIndexSqlITSuite extends FlintSparkSuite {
try {
sql(s"CREATE SKIPPING INDEX ON $testTableQualifiedName (name VALUE_SET)")

// Create a non-Flint index which has flint_ prefix in coincidence
// Create a non-Flint index which has "flint_" prefix in coincidence
openSearchClient
.indices()
.create(
new CreateIndexRequest("flint_spark_catalog_invalid_index"),
new CreateIndexRequest("flint_spark_catalog_invalid_index1"),
RequestOptions.DEFAULT)

// Create a non-Flint index which has "flint_" prefix and _meta mapping in coincidence
openSearchClient
.indices()
.create(
new CreateIndexRequest("flint_spark_catalog_invalid_index2")
.mapping(
"""{
| "_meta": {
| "custom": "test"
| }
|}
|""".stripMargin,
XContentType.JSON),
RequestOptions.DEFAULT)

// Show statement should ignore such index without problem
Expand Down

0 comments on commit 80312b5

Please sign in to comment.