Skip to content

Commit

Permalink
Fixing UT
Browse files Browse the repository at this point in the history
  • Loading branch information
huberylee committed Jun 8, 2022
1 parent 68a79f5 commit ecd94a9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ import org.apache.spark.sql.hudi.HoodieSparkSqlTestBase
import org.apache.spark.sql.hudi.command.{CreateIndexCommand, DropIndexCommand, ShowIndexesCommand}

class TestIndexSyntax extends HoodieSparkSqlTestBase {
private val sqlParser: ParserInterface = spark.sessionState.sqlParser
private val analyzer: Analyzer = spark.sessionState.analyzer

test("Test Create/Drop/Show/Refresh Index") {
withTempDir { tmp =>
Seq("cow", "mor").foreach { tableType =>
Expand All @@ -53,6 +50,9 @@ class TestIndexSyntax extends HoodieSparkSqlTestBase {
spark.sql(s"insert into $tableName values(2, 'a2', 10, 1001)")
spark.sql(s"insert into $tableName values(3, 'a3', 10, 1002)")

val sqlParser: ParserInterface = spark.sessionState.sqlParser
val analyzer: Analyzer = spark.sessionState.analyzer

var logicalPlan = sqlParser.parsePlan(s"show indexes from default.$tableName")
var resolvedLogicalPlan = analyzer.execute(logicalPlan)
assertResult(s"`default`.`$tableName`")(resolvedLogicalPlan.asInstanceOf[ShowIndexesCommand].tableId.toString())
Expand Down

0 comments on commit ecd94a9

Please sign in to comment.