Skip to content

Analyzer

Creating Instance

Analyzer takes the following to be created:

Analyzer is created when:

Analyzer

Query Analysis

Analysis analyze(
  Query query,
  Optional<Sink> sink)

analyze creates a Visitor (for the given Query and a flag to indicate whether the sink is defined or not for persistent queries).

analyze requests the Visitor to process the given Query and analyzeNonStdOutSink if the sink is defined.

analyze requests the Visitor to validate the analysis.

In the end, analyze requests the the Visitor for the Analysis.

analyze is used when:

Visitor

Visitor is a DefaultTraversalVisitor to produce an AstNode that Analyzer uses to analyze queries.

Visitor is a private final class of Analyzer.

Analysis

Visitor creates an Analysis when created.

The Analysis instance is mutated (changed) while visiting AST nodes while analyzing a query.

visitAliasedRelation

AstNode visitAliasedRelation(
  AliasedRelation node,
  Void context)

visitAliasedRelation makes sure that the Table relation is registered in the MetaStore and requests the Analysis to register the alias with the DataSource.

visitAliasedRelation is part of the AstVisitor abstraction.

visitSelect

AstNode visitSelect(
  Select node,
  Void context)

visitSelect...FIXME

visitSelect is part of the AstVisitor abstraction.

visitTableFunctions

void visitTableFunctions(
  Expression expression)

visitTableFunctions creates a TableFunctionVisitor to process the given Expression.

Back to top