Skip to content

Commit

Permalink
Add 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 19, 2024
1 parent 50f6695 commit d878587
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,28 @@ class FlintSparkSkippingIndexITSuite extends FlintSparkSuite {
}
}

test("should not rewrite original query if skipping index is logically deleted") {
flint
.skippingIndex()
.onTable(testTable)
.addPartitions("year", "month")
.create()
flint.deleteIndex(testIndex)

val query =
s"""
| SELECT name
| FROM $testTable
| WHERE year = 2023 AND month = 4
|""".stripMargin

val actual = sql(query).queryExecution.optimizedPlan
withFlintOptimizerDisabled {
val expect = sql(query).queryExecution.optimizedPlan
actual shouldBe expect
}
}

test("can build partition skipping index and rewrite applicable query") {
flint
.skippingIndex()
Expand Down

0 comments on commit d878587

Please sign in to comment.