Skip to content

Commit

Permalink
Minimise cmd permission
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
  • Loading branch information
andy-k-improving committed Dec 14, 2024
1 parent 816f6d6 commit f6e03dd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private static List<Expression> getoverridedlist(LogicalPlan lp, String tableNam
// then apply a dfDropColumns on main-search to avoid duplicate fields.
SparkSession sparkSession = SparkSession.getActiveSession().get();
QueryExecution queryExecutionSub = sparkSession.sessionState()
.executePlan(lp, CommandExecutionMode.ALL());
.executePlan(lp, CommandExecutionMode.SKIP());
Seq<Attribute> output = queryExecutionSub.analyzed().output();
List<Attribute> attributes = seqAsJavaList(output);
return attributes.stream()
Expand All @@ -380,7 +380,6 @@ private org.apache.spark.sql.catalyst.plans.logical.SubqueryAlias getRowNumStarP
UTF8String.fromString("1"), DataTypes.StringType), false);

NamedExpression appendCol = WindowSpecTransformer.buildRowNumber(seq(), seq(sortOrder));

List<NamedExpression> projectList = (context.getNamedParseExpressions().isEmpty())
? List.of(appendCol, new UnresolvedStar(Option.empty()))
: List.of(appendCol);
Expand Down

0 comments on commit f6e03dd

Please sign in to comment.