}
this.evalColumns = new int[functionColumns.size()];
for (int i = 0; i < evalColumns.length; i++) {
evalColumns[i] = functionColumns.get(i).getPosition();
}
this.vstring = new Value(typesTranslator.typeForString());
this.values = new Value[rowDef.getFieldCount()];
this.executionContexts = new TExecutionContext[values.length];
List<TInstance> inputs = Collections.singletonList(vstring.getType());
for (int fi = 0; fi < fieldColumns.length; fi++) {
int ci = fieldColumns[fi];
TInstance output = columns.get(fi).getType();
values[ci] = new Value(output);
// TODO: Only needed until every place gets type from
// ValueTarget, when there can just be one
// TExecutionContext wrapping the QueryContext.
executionContexts[ci] = new TExecutionContext(null,
inputs, output, queryContext,
ErrorHandlingMode.WARN,
ErrorHandlingMode.WARN,
ErrorHandlingMode.WARN);
}
for (int fi = 0; fi < constColumns.length; fi++) {
int ci = constColumns[fi];
Column column = defaultColumns.get(fi);
TInstance output = column.getType();
Value value = new Value(output);
TExecutionContext te = new TExecutionContext(null,
inputs, output, queryContext,
ErrorHandlingMode.WARN,
ErrorHandlingMode.WARN,
ErrorHandlingMode.WARN);
vstring.putString(column.getDefaultValue(), null);
value.getType().typeClass().fromObject(te, vstring, value);
values[ci] = value;
}
this.expressions = new TEvaluatableExpression[evalColumns.length];
TypesRegistryService registry = null;
if (evalColumns.length > 0) {