org.apache.calcite.adapter.enumerable.JavaRowFormat Java Examples
The following examples show how to use
org.apache.calcite.adapter.enumerable.JavaRowFormat.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EnumerableToSparkConverter.java From calcite with Apache License 2.0 | 6 votes |
public Result implementSpark(Implementor implementor) { // Generate: // Enumerable source = ...; // return SparkRuntime.createRdd(sparkContext, source); final BlockBuilder list = new BlockBuilder(); final EnumerableRel child = (EnumerableRel) getInput(); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), getRowType(), JavaRowFormat.CUSTOM); final Expression source = null; // TODO: final Expression sparkContext = Expressions.call( SparkMethod.GET_SPARK_CONTEXT.method, implementor.getRootExpression()); final Expression rdd = list.append( "rdd", Expressions.call( SparkMethod.CREATE_RDD.method, sparkContext, source)); list.add( Expressions.return_(null, rdd)); return implementor.result(physType, list.toBlock()); }
Example #2
Source File: SparkToEnumerableConverter.java From calcite with Apache License 2.0 | 6 votes |
public Result implement(EnumerableRelImplementor implementor, Prefer pref) { // Generate: // RDD rdd = ...; // return SparkRuntime.asEnumerable(rdd); final BlockBuilder list = new BlockBuilder(); final SparkRel child = (SparkRel) getInput(); final PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), JavaRowFormat.CUSTOM); SparkRel.Implementor sparkImplementor = new SparkImplementorImpl(implementor); final SparkRel.Result result = child.implementSpark(sparkImplementor); final Expression rdd = list.append("rdd", result.block); final Expression enumerable = list.append( "enumerable", Expressions.call( SparkMethod.AS_ENUMERABLE.method, rdd)); list.add( Expressions.return_(null, enumerable)); return implementor.result(physType, list.toBlock()); }
Example #3
Source File: OLAPTableScan.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { context.setReturnTupleInfo(rowType, columnRowType); String execFunction = genExecFunc(); PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), JavaRowFormat.ARRAY); MethodCallExpression exprCall = Expressions.call(table.getExpression(OLAPTable.class), execFunction, implementor.getRootExpression(), Expressions.constant(context.id)); return implementor.result(physType, Blocks.toBlock(exprCall)); }
Example #4
Source File: PigToEnumerableConverter.java From calcite with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} * * <p>This implementation does not actually execute the associated Pig Latin * script and return results. Instead it returns an empty * {@link org.apache.calcite.adapter.enumerable.EnumerableRel.Result} * in order to allow for testing and verification of every step of query * processing up to actual physical execution and result verification. * * <p>Next step is to invoke Pig from here, likely in local mode, have it * store results in a predefined file so they can be read here and returned as * a {@code Result} object. */ public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder list = new BlockBuilder(); final PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), rowType, pref.prefer(JavaRowFormat.ARRAY)); PigRel.Implementor impl = new PigRel.Implementor(); impl.visitChild(0, getInput()); Hook.QUERY_PLAN.run(impl.getScript()); // for script validation in tests list.add( Expressions.return_(null, Expressions.call( BuiltInMethod.EMPTY_ENUMERABLE.method))); return implementor.result(physType, list.toBlock()); }
Example #5
Source File: OLAPTableScan.java From kylin with Apache License 2.0 | 5 votes |
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { context.setReturnTupleInfo(rowType, columnRowType); String execFunction = genExecFunc(); PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), JavaRowFormat.ARRAY); MethodCallExpression exprCall = Expressions.call(table.getExpression(OLAPTable.class), execFunction, implementor.getRootExpression(), Expressions.constant(context.id)); return implementor.result(physType, Blocks.toBlock(exprCall)); }
Example #6
Source File: KylinEnumerableUnion.java From kylin with Apache License 2.0 | 5 votes |
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); Expression unionExp = null; for (Ord<RelNode> ord : Ord.zip(inputs)) { EnumerableRel input = (EnumerableRel) ord.e; final Result result = implementor.visitChild(this, ord.i, input, pref); Expression childExp = builder.append( "child" + ord.i, result.block); if (unionExp == null) { unionExp = childExp; } else { unionExp = createUnionExpression(unionExp, childExp, result.format == JavaRowFormat.ARRAY); } } builder.add(unionExp); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), getRowType(), pref.prefer(JavaRowFormat.CUSTOM)); return implementor.result(physType, builder.toBlock()); }
Example #7
Source File: RexNodeToJavaCodeCompiler.java From streamline with Apache License 2.0 | 5 votes |
private BlockBuilder compileToBlock(final RexProgram program, ParameterExpression context_, ParameterExpression outputValues_) { RelDataType inputRowType = program.getInputRowType(); final BlockBuilder builder = new BlockBuilder(); final JavaTypeFactoryImpl javaTypeFactory = new JavaTypeFactoryImpl(rexBuilder.getTypeFactory().getTypeSystem()); final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.<Expression, PhysType>of( Expressions.field(context_, BuiltInMethod.CONTEXT_VALUES.field), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final Expression root = Expressions.field(context_, BuiltInMethod.CONTEXT_ROOT.field); final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, null, root, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { builder.add( Expressions.statement( Expressions.assign( Expressions.arrayIndex(outputValues_, Expressions.constant(i)), list.get(i)))); } return builder; }
Example #8
Source File: ExpressionCompiler.java From attic-apex-malhar with Apache License 2.0 | 5 votes |
/** * Create quasi-Java expression from given {@link RexNode} * * @param node Expression in the form of {@link RexNode} * @param inputRowType Input Data type to expression in the form of {@link RelDataType} * @param outputRowType Output data type of expression in the form of {@link RelDataType} * * @return Returns quasi-Java expression */ public String getExpression(RexNode node, RelDataType inputRowType, RelDataType outputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); programBuilder.addProject(node, null); final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); final JavaTypeFactory javaTypeFactory = (JavaTypeFactory)rexBuilder.getTypeFactory(); final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl(ImmutableList .of(Pair.<Expression, PhysType>of(Expressions.variable(Object[].class, "inputValues"), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = new Function1<String, RexToLixTranslator.InputGetter>() { public RexToLixTranslator.InputGetter apply(String a0) { throw new UnsupportedOperationException(); } }; final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, builder, PhysTypeImpl.of(javaTypeFactory, outputRowType, JavaRowFormat.ARRAY, false), null, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { Statement statement = Expressions.statement(list.get(i)); builder.add(statement); } return finalizeExpression(builder.toBlock(), inputRowType); }
Example #9
Source File: KylinEnumerableUnion.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); Expression unionExp = null; for (Ord<RelNode> ord : Ord.zip(inputs)) { EnumerableRel input = (EnumerableRel) ord.e; final Result result = implementor.visitChild(this, ord.i, input, pref); Expression childExp = builder.append( "child" + ord.i, result.block); if (unionExp == null) { unionExp = childExp; } else { unionExp = createUnionExpression(unionExp, childExp, result.format == JavaRowFormat.ARRAY); } } builder.add(unionExp); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), getRowType(), pref.prefer(JavaRowFormat.CUSTOM)); return implementor.result(physType, builder.toBlock()); }
Example #10
Source File: ElasticsearchToEnumerableConverter.java From dk-fitting with Apache License 2.0 | 4 votes |
public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final ElasticsearchRelNode.Implementor esImplementor = new ElasticsearchRelNode.Implementor(); esImplementor.visitChild(0, getInput()); List<String> listField = esImplementor.getListField(); List<String> listField2 = new ArrayList<String>(); for (String field : listField){ //数据处理函数expr$0 转为lower.fieldName listField2.add(field); } ElasticsearchTable esTable = esImplementor.elasticsearchTable; final RelDataType rowType2 = esImplementor.elasticsearchTable.getRowType2(); final List<String> fieldNames1 = rowType2.getFieldNames(); //得到输出顺序 PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), rowType2, pref.prefer(JavaRowFormat.ARRAY)); final RelDataType rowType = esImplementor.elasticsearchTable.getRowType(); PhysType physType2 = PhysTypeImpl.of(implementor.getTypeFactory(), rowType, pref.prefer(JavaRowFormat.ARRAY)); // esTable.setOutNames(fieldNames1); List<String> fieldNames = ElasticsearchRules.elasticsearchFieldNames(rowType2); List<ElasticSearchFieldType> typeList = new ArrayList<ElasticSearchFieldType>(); for(int i = 0 ; i < fieldNames.size(); i++){ Class type = physType.fieldClass(i); String typeName = type.toString().substring(type.toString().lastIndexOf(".") + 1).toLowerCase(); if("integer".equals(typeName)){ typeName = "int"; } typeList.add(ElasticSearchFieldType.of(typeName)); } boolean oneColumFlag = false; if(typeList.size() == 1){ oneColumFlag = true; } TwoTuple<List<Object>, List<Object[]>> listTwoTuple = esTable.find(typeList,listField,oneColumFlag); // List<Object[]> resultList = esTable.find(typeList, oneColumFlag); ConstantExpression constant = oneColumFlag ? Expressions.constant(listTwoTuple.first.toArray()) : Expressions.constant(listTwoTuple.second.toArray()); Result result = implementor.result(physType2, Blocks.toBlock(Expressions.call(BuiltInMethod.AS_ENUMERABLE2.method, constant))); return result; }
Example #11
Source File: JdbcToSparkConverter.java From calcite with Apache License 2.0 | 4 votes |
public SparkRel.Result implementSpark(SparkRel.Implementor implementor) { // Generate: // ResultSetEnumerable.of(schema.getDataSource(), "select ...") final BlockBuilder list = new BlockBuilder(); final JdbcRel child = (JdbcRel) getInput(); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), getRowType(), JavaRowFormat.CUSTOM); final JdbcConvention jdbcConvention = (JdbcConvention) child.getConvention(); String sql = generateSql(jdbcConvention.dialect); if (CalciteSystemProperty.DEBUG.value()) { System.out.println("[" + sql + "]"); } final Expression sqlLiteral = list.append("sql", Expressions.constant(sql)); final List<Primitive> primitives = new ArrayList<>(); for (int i = 0; i < getRowType().getFieldCount(); i++) { final Primitive primitive = Primitive.ofBoxOr(physType.fieldClass(i)); primitives.add(primitive != null ? primitive : Primitive.OTHER); } final Expression primitivesLiteral = list.append("primitives", Expressions.constant( primitives.toArray(new Primitive[0]))); final Expression enumerable = list.append( "enumerable", Expressions.call( BuiltInMethod.RESULT_SET_ENUMERABLE_OF.method, Expressions.call( Expressions.convert_( jdbcConvention.expression, JdbcSchema.class), BuiltInMethod.JDBC_SCHEMA_DATA_SOURCE.method), sqlLiteral, primitivesLiteral)); list.add( Expressions.return_(null, enumerable)); return implementor.result(physType, list.toBlock()); }
Example #12
Source File: SparkRules.java From calcite with Apache License 2.0 | 4 votes |
public Result implementSpark(Implementor implementor) { /* return Linq4j.asSpark( new Object[][] { new Object[] {1, 2}, new Object[] {3, 4} }); */ final JavaTypeFactory typeFactory = (JavaTypeFactory) getCluster().getTypeFactory(); final BlockBuilder builder = new BlockBuilder(); final PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), JavaRowFormat.CUSTOM); final Type rowClass = physType.getJavaRowType(); final List<Expression> expressions = new ArrayList<>(); final List<RelDataTypeField> fields = rowType.getFieldList(); for (List<RexLiteral> tuple : tuples) { final List<Expression> literals = new ArrayList<>(); for (Pair<RelDataTypeField, RexLiteral> pair : Pair.zip(fields, tuple)) { literals.add( RexToLixTranslator.translateLiteral( pair.right, pair.left.getType(), typeFactory, RexImpTable.NullAs.NULL)); } expressions.add(physType.record(literals)); } builder.add( Expressions.return_(null, Expressions.call(SparkMethod.ARRAY_TO_RDD.method, Expressions.call(SparkMethod.GET_SPARK_CONTEXT.method, implementor.getRootExpression()), Expressions.newArrayInit(Primitive.box(rowClass), expressions)))); return implementor.result(physType, builder.toBlock()); }
Example #13
Source File: SparkRules.java From calcite with Apache License 2.0 | 4 votes |
public Result implementSpark(Implementor implementor) { final JavaTypeFactory typeFactory = implementor.getTypeFactory(); final BlockBuilder builder = new BlockBuilder(); final SparkRel child = (SparkRel) getInput(); final Result result = implementor.visitInput(this, 0, child); final PhysType physType = PhysTypeImpl.of( typeFactory, getRowType(), JavaRowFormat.CUSTOM); // final RDD<Employee> inputRdd = <<child adapter>>; // return inputRdd.flatMap( // new FlatMapFunction<Employee, X>() { // public List<X> call(Employee e) { // if (!(e.empno < 10)) { // return Collections.emptyList(); // } // return Collections.singletonList( // new X(...))); // } // }) Type outputJavaType = physType.getJavaRowType(); final Type rddType = Types.of( JavaRDD.class, outputJavaType); Type inputJavaType = result.physType.getJavaRowType(); final Expression inputRdd_ = builder.append( "inputRdd", result.block); BlockBuilder builder2 = new BlockBuilder(); final ParameterExpression e_ = Expressions.parameter(inputJavaType, "e"); if (program.getCondition() != null) { Expression condition = RexToLixTranslator.translateCondition( program, typeFactory, builder2, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of((Expression) e_, result.physType))), null, implementor.getConformance()); builder2.add( Expressions.ifThen( Expressions.not(condition), Expressions.return_(null, Expressions.call( BuiltInMethod.COLLECTIONS_EMPTY_LIST.method)))); } final SqlConformance conformance = SqlConformanceEnum.DEFAULT; List<Expression> expressions = RexToLixTranslator.translateProjects( program, typeFactory, conformance, builder2, null, DataContext.ROOT, new RexToLixTranslator.InputGetterImpl( Collections.singletonList( Pair.of((Expression) e_, result.physType))), null); builder2.add( Expressions.return_(null, Expressions.convert_( Expressions.call( BuiltInMethod.COLLECTIONS_SINGLETON_LIST.method, physType.record(expressions)), List.class))); final BlockStatement callBody = builder2.toBlock(); builder.add( Expressions.return_( null, Expressions.call( inputRdd_, SparkMethod.RDD_FLAT_MAP.method, Expressions.lambda( SparkRuntime.CalciteFlatMapFunction.class, callBody, e_)))); return implementor.result(physType, builder.toBlock()); }
Example #14
Source File: GeodeToEnumerableConverter.java From calcite with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} * * @param implementor GeodeImplementContext */ @Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { // travers all relations form this to the scan leaf final GeodeImplementContext geodeImplementContext = new GeodeImplementContext(); ((GeodeRel) getInput()).implement(geodeImplementContext); final RelDataType rowType = getRowType(); // PhysType is Enumerable Adapter class that maps SQL types (getRowType) // with physical Java types (getJavaTypes()) final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), rowType, pref.prefer(JavaRowFormat.ARRAY)); final List<Class> physFieldClasses = new AbstractList<Class>() { public Class get(int index) { return physType.fieldClass(index); } public int size() { return rowType.getFieldCount(); } }; // Expression meta-program for calling the GeodeTable.GeodeQueryable#query // method form the generated code final BlockBuilder blockBuilder = new BlockBuilder().append( Expressions.call( geodeImplementContext.table.getExpression(GeodeTable.GeodeQueryable.class), GEODE_QUERY_METHOD, // fields constantArrayList(Pair.zip(geodeFieldNames(rowType), physFieldClasses), Pair.class), // selected fields constantArrayList(toListMapPairs(geodeImplementContext.selectFields), Pair.class), // aggregate functions constantArrayList( toListMapPairs(geodeImplementContext.oqlAggregateFunctions), Pair.class), constantArrayList(geodeImplementContext.groupByFields, String.class), constantArrayList(geodeImplementContext.whereClause, String.class), constantArrayList(geodeImplementContext.orderByFields, String.class), Expressions.constant(geodeImplementContext.limitValue))); return implementor.result(physType, blockBuilder.toBlock()); }
Example #15
Source File: ElasticsearchToEnumerableConverter.java From calcite with Apache License 2.0 | 4 votes |
@Override public Result implement(EnumerableRelImplementor relImplementor, Prefer prefer) { final BlockBuilder block = new BlockBuilder(); final ElasticsearchRel.Implementor implementor = new ElasticsearchRel.Implementor(); implementor.visitChild(0, getInput()); final RelDataType rowType = getRowType(); final PhysType physType = PhysTypeImpl.of(relImplementor.getTypeFactory(), rowType, prefer.prefer(JavaRowFormat.ARRAY)); final Expression fields = block.append("fields", constantArrayList( Pair.zip(ElasticsearchRules.elasticsearchFieldNames(rowType), new AbstractList<Class>() { @Override public Class get(int index) { return physType.fieldClass(index); } @Override public int size() { return rowType.getFieldCount(); } }), Pair.class)); final Expression table = block.append("table", implementor.table .getExpression(ElasticsearchTable.ElasticsearchQueryable.class)); final Expression ops = block.append("ops", Expressions.constant(implementor.list)); final Expression sort = block.append("sort", constantArrayList(implementor.sort, Pair.class)); final Expression groupBy = block.append("groupBy", Expressions.constant(implementor.groupBy)); final Expression aggregations = block.append("aggregations", constantArrayList(implementor.aggregations, Pair.class)); final Expression mappings = block.append("mappings", Expressions.constant(implementor.expressionItemMap)); final Expression offset = block.append("offset", Expressions.constant(implementor.offset)); final Expression fetch = block.append("fetch", Expressions.constant(implementor.fetch)); Expression enumerable = block.append("enumerable", Expressions.call(table, ElasticsearchMethod.ELASTICSEARCH_QUERYABLE_FIND.method, ops, fields, sort, groupBy, aggregations, mappings, offset, fetch)); block.add(Expressions.return_(null, enumerable)); return relImplementor.result(physType, block.toBlock()); }
Example #16
Source File: MongoToEnumerableConverter.java From calcite with Apache License 2.0 | 4 votes |
public Result implement(EnumerableRelImplementor implementor, Prefer pref) { // Generates a call to "find" or "aggregate", depending upon whether // an aggregate is present. // // ((MongoTable) schema.getTable("zips")).find( // "{state: 'CA'}", // "{city: 1, zipcode: 1}") // // ((MongoTable) schema.getTable("zips")).aggregate( // "{$filter: {state: 'CA'}}", // "{$group: {_id: '$city', c: {$sum: 1}, p: {$sum: "$pop"}}") final BlockBuilder list = new BlockBuilder(); final MongoRel.Implementor mongoImplementor = new MongoRel.Implementor(); mongoImplementor.visitChild(0, getInput()); int aggCount = 0; int findCount = 0; String project = null; String filter = null; for (Pair<String, String> op : mongoImplementor.list) { if (op.left == null) { ++aggCount; } if (op.right.startsWith("{$match:")) { filter = op.left; ++findCount; } if (op.right.startsWith("{$project:")) { project = op.left; ++findCount; } } final RelDataType rowType = getRowType(); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), rowType, pref.prefer(JavaRowFormat.ARRAY)); final Expression fields = list.append("fields", constantArrayList( Pair.zip(MongoRules.mongoFieldNames(rowType), new AbstractList<Class>() { @Override public Class get(int index) { return physType.fieldClass(index); } @Override public int size() { return rowType.getFieldCount(); } }), Pair.class)); final Expression table = list.append("table", mongoImplementor.table.getExpression( MongoTable.MongoQueryable.class)); List<String> opList = Pair.right(mongoImplementor.list); final Expression ops = list.append("ops", constantArrayList(opList, String.class)); Expression enumerable = list.append("enumerable", Expressions.call(table, MongoMethod.MONGO_QUERYABLE_AGGREGATE.method, fields, ops)); if (CalciteSystemProperty.DEBUG.value()) { System.out.println("Mongo: " + opList); } Hook.QUERY_PLAN.run(opList); list.add( Expressions.return_(null, enumerable)); return implementor.result(physType, list.toBlock()); }
Example #17
Source File: JaninoRexCompiler.java From calcite with Apache License 2.0 | 4 votes |
public Scalar compile(List<RexNode> nodes, RelDataType inputRowType) { final RexProgramBuilder programBuilder = new RexProgramBuilder(inputRowType, rexBuilder); for (RexNode node : nodes) { programBuilder.addProject(node, null); } final RexProgram program = programBuilder.getProgram(); final BlockBuilder builder = new BlockBuilder(); final ParameterExpression context_ = Expressions.parameter(Context.class, "context"); final ParameterExpression outputValues_ = Expressions.parameter(Object[].class, "outputValues"); final JavaTypeFactoryImpl javaTypeFactory = new JavaTypeFactoryImpl(rexBuilder.getTypeFactory().getTypeSystem()); // public void execute(Context, Object[] outputValues) final RexToLixTranslator.InputGetter inputGetter = new RexToLixTranslator.InputGetterImpl( ImmutableList.of( Pair.of( Expressions.field(context_, BuiltInMethod.CONTEXT_VALUES.field), PhysTypeImpl.of(javaTypeFactory, inputRowType, JavaRowFormat.ARRAY, false)))); final Function1<String, RexToLixTranslator.InputGetter> correlates = a0 -> { throw new UnsupportedOperationException(); }; final Expression root = Expressions.field(context_, BuiltInMethod.CONTEXT_ROOT.field); final SqlConformance conformance = SqlConformanceEnum.DEFAULT; // TODO: get this from implementor final List<Expression> list = RexToLixTranslator.translateProjects(program, javaTypeFactory, conformance, builder, null, root, inputGetter, correlates); for (int i = 0; i < list.size(); i++) { builder.add( Expressions.statement( Expressions.assign( Expressions.arrayIndex(outputValues_, Expressions.constant(i)), list.get(i)))); } return baz(context_, outputValues_, builder.toBlock()); }