public Object end() { System.arraycopy(values, 0, def.endContext.values, 0, values.length); return def.endScalar.execute(def.endContext); } }
public Object end() { System.arraycopy(values, 0, def.endContext.values, 0, values.length); return def.endScalar.execute(def.endContext); } }
public void send(Row row) { System.arraycopy(row.getValues(), 0, def.sendContext.values, 0, def.rowLength); System.arraycopy(values, 0, def.sendContext.values, def.rowLength, values.length); def.addScalar.execute(def.sendContext, values); }
public void send(Row row) { System.arraycopy(row.getValues(), 0, def.sendContext.values, 0, def.rowLength); System.arraycopy(values, 0, def.sendContext.values, def.rowLength, values.length); def.addScalar.execute(def.sendContext, values); }
private ImmutableList<Row> createRows(Compiler compiler, ImmutableList<ImmutableList<RexLiteral>> tuples) { final List<RexNode> nodes = new ArrayList<>(); for (ImmutableList<RexLiteral> tuple : tuples) { nodes.addAll(tuple); } final Scalar scalar = compiler.compile(nodes, null); final Object[] values = new Object[nodes.size()]; final Context context = compiler.createContext(); scalar.execute(context, values); final ImmutableList.Builder<Row> rows = ImmutableList.builder(); Object[] subValues = new Object[fieldCount]; for (int i = 0; i < values.length; i += fieldCount) { System.arraycopy(values, i, subValues, 0, fieldCount); rows.add(Row.asCopy(subValues)); } return rows.build(); }
private ImmutableList<Row> createRows(Compiler compiler, ImmutableList<ImmutableList<RexLiteral>> tuples) { final List<RexNode> nodes = new ArrayList<>(); for (ImmutableList<RexLiteral> tuple : tuples) { nodes.addAll(tuple); } final Scalar scalar = compiler.compile(nodes, null); final Object[] values = new Object[nodes.size()]; final Context context = compiler.createContext(); scalar.execute(context, values); final ImmutableList.Builder<Row> rows = ImmutableList.builder(); Object[] subValues = new Object[fieldCount]; for (int i = 0; i < values.length; i += fieldCount) { System.arraycopy(values, i, subValues, 0, fieldCount); rows.add(Row.asCopy(subValues)); } return rows.build(); }
public void run() throws InterruptedException { Row row; while ((row = source.receive()) != null) { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); if (b != null && b) { sink.send(row); } } } }
public void run() throws InterruptedException { Row row; while ((row = source.receive()) != null) { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); if (b != null && b) { sink.send(row); } } } }
public void run() throws InterruptedException { Row row; while ((row = source.receive()) != null) { context.values = row.getValues(); Object[] values = new Object[projectCount]; scalar.execute(context, values); sink.send(new Row(values)); } } }
public void run() throws InterruptedException { Row row; while ((row = source.receive()) != null) { context.values = row.getValues(); Object[] values = new Object[projectCount]; scalar.execute(context, values); sink.send(new Row(values)); } } }
public void run() throws InterruptedException { List<Row> rightList = null; final int leftCount = rel.getLeft().getRowType().getFieldCount(); final int rightCount = rel.getRight().getRowType().getFieldCount(); context.values = new Object[rel.getRowType().getFieldCount()]; Row left; Row right; while ((left = leftSource.receive()) != null) { System.arraycopy(left.getValues(), 0, context.values, 0, leftCount); if (rightList == null) { rightList = new ArrayList<>(); while ((right = rightSource.receive()) != null) { rightList.add(right); } } for (Row right2 : rightList) { System.arraycopy(right2.getValues(), 0, context.values, leftCount, rightCount); final Boolean execute = (Boolean) condition.execute(context); if (execute != null && execute) { sink.send(Row.asCopy(context.values)); } } } } }
public void run() throws InterruptedException { List<Row> rightList = null; final int leftCount = rel.getLeft().getRowType().getFieldCount(); final int rightCount = rel.getRight().getRowType().getFieldCount(); context.values = new Object[rel.getRowType().getFieldCount()]; Row left; Row right; while ((left = leftSource.receive()) != null) { System.arraycopy(left.getValues(), 0, context.values, 0, leftCount); if (rightList == null) { rightList = new ArrayList<>(); while ((right = rightSource.receive()) != null) { rightList.add(right); } } for (Row right2 : rightList) { System.arraycopy(right2.getValues(), 0, context.values, leftCount, rightCount); final Boolean execute = (Boolean) condition.execute(context); if (execute != null && execute) { sink.send(Row.asCopy(context.values)); } } } } }
enumerable = enumerable.where(row -> { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); return b != null && b; });
enumerable = enumerable.where(row -> { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); return b != null && b; });