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 b021076 commit a66a0dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ 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"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs
);
DescribeTableCommand(
TableIdentifier("flint_ppl_test"),
Map.empty[String, String],
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"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs)
val expectedPlan = DescribeTableCommand(TableIdentifier("t"), Map.empty[String, String], 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("describe catalog.schema.t"), Map.empty, isExtended = false, output = DescribeRelation.getOutputAttrs)
val expectedPlan = DescribeTableCommand(TableIdentifier("describe catalog.schema.t"), Map.empty[String, String].empty, isExtended = false, output = DescribeRelation.getOutputAttrs)
comparePlans(expectedPlan, logPlan, false)
}

Expand Down

0 comments on commit a66a0dc

Please sign in to comment.