use of io.crate.analyze.symbol.format.SymbolPrinter in project crate by crate.
the class AnalyzedTableElements method validateGeneratedColumns.
private void validateGeneratedColumns(TableIdent tableIdent, Collection<? extends Reference> existingColumns, Functions functions, ParameterContext parameterContext, SessionContext sessionContext) {
List<Reference> tableReferences = new ArrayList<>();
for (AnalyzedColumnDefinition columnDefinition : columns) {
buildReference(tableIdent, columnDefinition, tableReferences);
}
tableReferences.addAll(existingColumns);
TableReferenceResolver tableReferenceResolver = new TableReferenceResolver(tableReferences);
ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(functions, sessionContext, parameterContext, tableReferenceResolver, null);
SymbolPrinter printer = new SymbolPrinter(functions);
ExpressionAnalysisContext expressionAnalysisContext = new ExpressionAnalysisContext();
for (AnalyzedColumnDefinition columnDefinition : columns) {
if (columnDefinition.generatedExpression() != null) {
processGeneratedExpression(expressionAnalyzer, printer, columnDefinition, expressionAnalysisContext);
}
}
}
Aggregations