Search in sources :

Example 1 with SubQueryAndParamBinder

use of io.crate.planner.operators.SubQueryAndParamBinder in project crate by crate.

the class Assignments method bindSources.

public Symbol[] bindSources(DocTableInfo tableInfo, Row params, SubQueryResults subQueryResults) {
    Symbol[] boundSources = new Symbol[targetColumns.length];
    SubQueryAndParamBinder binder = new SubQueryAndParamBinder(params, subQueryResults);
    for (int i = 0; i < boundSources.length; i++) {
        Symbol source = ValueNormalizer.normalizeInputForReference(binder.apply(sources[i]), targetColumns[i], tableInfo, s -> normalizer.normalize(s, CoordinatorTxnCtx.systemTransactionContext()));
        if (source instanceof Input) {
            ConstraintsValidator.validate(((Input) source).value(), targetColumns[i], tableInfo.notNullColumns());
        }
        boundSources[i] = source;
    }
    return boundSources;
}
Also used : Input(io.crate.data.Input) SubQueryAndParamBinder(io.crate.planner.operators.SubQueryAndParamBinder)

Aggregations

Input (io.crate.data.Input)1 SubQueryAndParamBinder (io.crate.planner.operators.SubQueryAndParamBinder)1