From 16510b9109721e502464d71fb3d8a31883e33cf3 Mon Sep 17 00:00:00 2001 From: Chen Dai Date: Thu, 19 Oct 2023 11:56:10 -0700 Subject: [PATCH] Remove skipping index name Signed-off-by: Chen Dai --- .../flint/spark/skipping/FlintSparkSkippingIndex.scala | 2 +- .../flint/spark/skipping/FlintSparkSkippingIndexSuite.scala | 2 +- .../flint/spark/FlintSparkIndexJobSqlITSuite.scala | 6 +++--- .../flint/spark/FlintSparkSkippingIndexITSuite.scala | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flint-spark-integration/src/main/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndex.scala b/flint-spark-integration/src/main/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndex.scala index eb2075b63..9f895803a 100644 --- a/flint-spark-integration/src/main/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndex.scala +++ b/flint-spark-integration/src/main/scala/org/opensearch/flint/spark/skipping/FlintSparkSkippingIndex.scala @@ -60,7 +60,7 @@ case class FlintSparkSkippingIndex( val schemaJson = generateSchemaJSON(fieldTypes) metadataBuilder(this) - .name(name()) + .name("") // skipping index is unique per table without name .source(tableName) .indexedColumns(indexColumnMaps) .schema(schemaJson) 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 d52c43842..37e9e4395 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 @@ -40,7 +40,7 @@ class FlintSparkSkippingIndexSuite extends FlintSuite { val metadata = index.metadata() metadata.kind shouldBe SKIPPING_INDEX_TYPE - metadata.name shouldBe index.name() + metadata.name shouldBe "" metadata.source shouldBe testTable metadata.indexedColumns shouldBe Array( Map( diff --git a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexJobSqlITSuite.scala b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexJobSqlITSuite.scala index e741c5710..2483ce978 100644 --- a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexJobSqlITSuite.scala +++ b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkIndexJobSqlITSuite.scala @@ -45,13 +45,13 @@ class FlintSparkIndexJobSqlITSuite extends FlintSparkSuite { startSkippingIndexJob() checkAnswer( sql("SHOW INDEX JOBS"), - Seq(Row(testSkippingIndex, testSkippingIndex, testTable, "{}"))) + Seq(Row(testSkippingIndex, "", testTable, "{}"))) startCoveringIndexJob() checkAnswer( sql("SHOW INDEX JOBS"), Seq( - Row(testSkippingIndex, testSkippingIndex, testTable, "{}"), + Row(testSkippingIndex, "", testTable, "{}"), Row(testCoveringIndex, testIndex, testTable, "{}"))) withTempDir { checkpointDir => @@ -59,7 +59,7 @@ class FlintSparkIndexJobSqlITSuite extends FlintSparkSuite { checkAnswer( sql("SHOW INDEX JOBS"), Seq( - Row(testSkippingIndex, testSkippingIndex, testTable, "{}"), + Row(testSkippingIndex, "", testTable, "{}"), Row(testCoveringIndex, testIndex, testTable, "{}"), Row(testMvIndex, testMv, testMvQuery, "{}"))) } diff --git a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkSkippingIndexITSuite.scala b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkSkippingIndexITSuite.scala index e3fb467e6..d917e5c6d 100644 --- a/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkSkippingIndexITSuite.scala +++ b/integ-test/src/test/scala/org/opensearch/flint/spark/FlintSparkSkippingIndexITSuite.scala @@ -54,7 +54,7 @@ class FlintSparkSkippingIndexITSuite extends FlintSparkSuite { index shouldBe defined index.get.metadata().getContent should matchJson(s"""{ | "_meta": { - | "name": "flint_spark_catalog_default_test_skipping_index", + | "name": "", | "version": "${current()}", | "kind": "skipping", | "indexedColumns": [ @@ -452,7 +452,7 @@ class FlintSparkSkippingIndexITSuite extends FlintSparkSuite { index.get.metadata().getContent should matchJson( s"""{ | "_meta": { - | "name": "flint_spark_catalog_default_data_type_table_skipping_index", + | "name": "", | "version": "${current()}", | "kind": "skipping", | "indexedColumns": [