diff --git a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexSqlITSuite.scala b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexSqlITSuite.scala index ab4762a3e..61a16779a 100644 --- a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexSqlITSuite.scala +++ b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexSqlITSuite.scala @@ -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 @@ -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