Skip to content

Commit

Permalink
Add more IT for drop statement
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 18, 2023
1 parent 35e95ab commit 90c6d3f
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package org.opensearch.flint.spark

import java.sql.Timestamp

import scala.Option.empty
import scala.collection.JavaConverters.mapAsJavaMapConverter

import org.json4s.{Formats, NoTypeHints}
Expand Down Expand Up @@ -128,5 +129,17 @@ class FlintSparkMaterializedViewSqlITSuite extends FlintSparkSuite {
sql(s"CREATE MATERIALIZED VIEW IF NOT EXISTS $testMvName AS $testQuery")
}

test("drop materialized view") {
flint
.materializedView()
.name(testMvName)
.query(testQuery)
.create()

sql(s"DROP MATERIALIZED VIEW $testMvName")

flint.describeIndex(testFlintIndex) shouldBe empty
}

private def timestamp(ts: String): Timestamp = Timestamp.valueOf(ts)
}

0 comments on commit 90c6d3f

Please sign in to comment.