Skip to content

Commit

Permalink
update ppl IT suite dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <yang.db.dev@gmail.com>
  • Loading branch information
YANG-DB committed Sep 7, 2023
1 parent d55b774 commit 8bbe0d9
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,14 @@ import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.analysis.{UnresolvedAttribute, UnresolvedRelation}
import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, Project}
import org.apache.spark.sql.streaming.StreamTest
import org.opensearch.flint.spark.skipping.FlintSparkSkippingIndex.getSkippingIndexName

class FlintSparkPPLITSuite
extends QueryTest
with FlintPPLSuite
with StreamTest {

/** Flint Spark high level API for assertion */
private lazy val flint: FlintSpark = new FlintSpark(spark)

/** Test table and index name */
private val testTable = "default.flint_sql_test"
private val testIndex = getSkippingIndexName(testTable)

override def beforeAll(): Unit = {
super.beforeAll()
Expand Down Expand Up @@ -54,8 +49,6 @@ class FlintSparkPPLITSuite

protected override def afterEach(): Unit = {
super.afterEach()
flint.deleteIndex(testIndex)

// Stop all streaming jobs if any
spark.streams.active.foreach { job =>
job.stop()
Expand All @@ -72,7 +65,7 @@ class FlintSparkPPLITSuite
// Retrieve the logical plan
val logicalPlan: LogicalPlan = frame.queryExecution.optimizedPlan
// Define the expected logical plan
val expectedPlan: LogicalPlan = Project(Seq(UnresolvedAttribute("*")), UnresolvedRelation(TableIdentifier("test_table")))
val expectedPlan: LogicalPlan = Project(Seq(UnresolvedAttribute("*")), UnresolvedRelation(TableIdentifier(testTable)))
// Compare the two plans
assert(expectedPlan === logicalPlan)

Expand Down

0 comments on commit 8bbe0d9

Please sign in to comment.