Skip to content

Commit

Permalink
Remove skipping index name
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <[email protected]>
  • Loading branch information
dai-chen committed Oct 20, 2023
1 parent 01a8f34 commit 4a54dd5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ 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 =>
startMaterializedViewIndexJob(checkpointDir)
checkAnswer(
sql("SHOW INDEX JOBS"),
Seq(
Row(testSkippingIndex, testSkippingIndex, testTable, "{}"),
Row(testSkippingIndex, "", testTable, "{}"),
Row(testCoveringIndex, testIndex, testTable, "{}"),
Row(testMvIndex, testMv, testMvQuery, "{}")))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down

0 comments on commit 4a54dd5

Please sign in to comment.