Skip to content

Commit

Permalink
update visitRelation with DescribeTableCommand ctor
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Aug 7, 2024
1 parent e34c0c6 commit b021076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class FlintSparkPPLBasicITSuite
val logicalPlan: LogicalPlan = frame.queryExecution.commandExecuted.asInstanceOf[CommandResult].commandLogicalPlan
// Define the expected logical plan
val expectedPlan: LogicalPlan =
DescribeTableCommand(TableIdentifier("default.flint_ppl_test"), null, isExtended = false, output = Seq())
DescribeTableCommand(TableIdentifier("default.flint_ppl_test"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs
);
// Compare the two plans
comparePlans(logicalPlan, expectedPlan, checkAnalysis = false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PPLLogicalPlanBasicQueriesTranslatorTestSuite
val context = new CatalystPlanContext
val logPlan = planTransformer.visit(plan(pplParser, "describe t", false), context)

val expectedPlan = DescribeTableCommand(TableIdentifier("t"), null, isExtended = false, Seq.empty)
val expectedPlan = DescribeTableCommand(TableIdentifier("t"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs)
comparePlans(expectedPlan, logPlan, false)
}

Expand All @@ -41,7 +41,7 @@ test("test FQN table describe table clause") {
val context = new CatalystPlanContext
val logPlan = planTransformer.visit(plan(pplParser, "describe catalog.schema.t", false), context)

val expectedPlan = DescribeTableCommand(TableIdentifier("catalog.schema.t"), null, isExtended = false, Seq.empty)
val expectedPlan = DescribeTableCommand(TableIdentifier("describe catalog.schema.t"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs)
comparePlans(expectedPlan, logPlan, false)
}

Expand Down

0 comments on commit b021076

Please sign in to comment.