Skip to content

Commit

Permalink
Use utility function for checking is nested in NestedAnalyzer.
Browse files Browse the repository at this point in the history
Signed-off-by: forestmvey <[email protected]>
  • Loading branch information
forestmvey committed Jun 28, 2023
1 parent 128ed3b commit a2d0009
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ public LogicalPlan visitAlias(Alias node, AnalysisContext context) {
public LogicalPlan visitNestedAllTupleFields(NestedAllTupleFields node, AnalysisContext context) {
List<Map<String, ReferenceExpression>> args = new ArrayList<>();
for (NamedExpression namedExpr : namedExpressions) {

if (namedExpr.getDelegated() instanceof FunctionExpression
&& ((FunctionExpression) namedExpr.getDelegated()).getFunctionName()
.getFunctionName().equalsIgnoreCase(BuiltinFunctionName.NESTED.name())) {

if (isNestedFunction(namedExpr.getDelegated())) {
ReferenceExpression field =
(ReferenceExpression) ((FunctionExpression) namedExpr.getDelegated())
.getArguments().get(0);
Expand Down

0 comments on commit a2d0009

Please sign in to comment.