@Test public void rename_to_invalid_expression() { SemanticCheckException exception = assertThrows( SemanticCheckException.class, () -> analyze( AstDSL.rename( AstDSL.agg( AstDSL.relation("schema"), AstDSL.exprList( AstDSL.alias("avg(integer_value)", AstDSL.aggregate("avg", field( "integer_value")))), Collections.emptyList(), ImmutableList.of(), AstDSL.defaultStatsArgs()), AstDSL.map( AstDSL.aggregate("avg", field("integer_value")), AstDSL.aggregate("avg", field("integer_value")))))); assertEquals( "the target expected to be field, but is avg(Field(field=integer_value, fieldArgs=[]))", exception.getMessage()); }
public LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context) { return unresolved.accept(this, context); }
Analyzer extends AbstractNodeVisitor<LogicalPlan, AnalysisContext> { public LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context) { return unresolved.accept(this, context); } }
Analyzer extends AbstractNodeVisitor<LogicalPlan, AnalysisContext> { public LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context) { return unresolved.accept(this, context); } Analyzer(
      ExpressionAnalyzer expressionAnalyzer,
      StorageEngine storageEngine); }
Analyzer extends AbstractNodeVisitor<LogicalPlan, AnalysisContext> { public LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context) { return unresolved.accept(this, context); } Analyzer(
      ExpressionAnalyzer expressionAnalyzer,
      StorageEngine storageEngine); LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context); @Override LogicalPlan visitRelation(Relation node, AnalysisContext context); @Override LogicalPlan visitFilter(Filter node, AnalysisContext context); @Override LogicalPlan visitRename(Rename node, AnalysisContext context); @Override LogicalPlan visitAggregation(Aggregation node, AnalysisContext context); @Override LogicalPlan visitRareTopN(RareTopN node, AnalysisContext context); @Override LogicalPlan visitProject(Project node, AnalysisContext context); @Override LogicalPlan visitEval(Eval node, AnalysisContext context); @Override LogicalPlan visitSort(Sort node, AnalysisContext context); @Override LogicalPlan visitDedupe(Dedupe node, AnalysisContext context); @Override LogicalPlan visitValues(Values node, AnalysisContext context); }
Analyzer extends AbstractNodeVisitor<LogicalPlan, AnalysisContext> { public LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context) { return unresolved.accept(this, context); } Analyzer(
      ExpressionAnalyzer expressionAnalyzer,
      StorageEngine storageEngine); LogicalPlan analyze(UnresolvedPlan unresolved, AnalysisContext context); @Override LogicalPlan visitRelation(Relation node, AnalysisContext context); @Override LogicalPlan visitFilter(Filter node, AnalysisContext context); @Override LogicalPlan visitRename(Rename node, AnalysisContext context); @Override LogicalPlan visitAggregation(Aggregation node, AnalysisContext context); @Override LogicalPlan visitRareTopN(RareTopN node, AnalysisContext context); @Override LogicalPlan visitProject(Project node, AnalysisContext context); @Override LogicalPlan visitEval(Eval node, AnalysisContext context); @Override LogicalPlan visitSort(Sort node, AnalysisContext context); @Override LogicalPlan visitDedupe(Dedupe node, AnalysisContext context); @Override LogicalPlan visitValues(Values node, AnalysisContext context);  }