protected Object[] transform(Row row) { return row.getValues(); } };
protected Object[] transform(Row row) { return row.getValues(); } };
public void send(Row row) { final Object[] args = {value, row.getValues()[factory.argOrdinal]}; for (int i = 1; i < args.length; i++) { if (args[i] == null) { return; // one of the arguments is null; don't add to the total } } try { value = factory.aggFunction.addMethod.invoke(factory.instance, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); } empty = false; }
public void send(Row row) { final Object[] args = {value, row.getValues()[factory.argOrdinal]}; for (int i = 1; i < args.length; i++) { if (args[i] == null) { return; // one of the arguments is null; don't add to the total } } try { value = factory.aggFunction.addMethod.invoke(factory.instance, args); } catch (IllegalAccessException | InvocationTargetException e) { throw new RuntimeException(e); } empty = false; }
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) { if (row.getValues()[filterArg] == Boolean.TRUE) { accumulator.send(row); } }
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) { if (row.getValues()[filterArg] == Boolean.TRUE) { accumulator.send(row); } }
private Comparator<Row> comparator(RelFieldCollation fieldCollation) { final int nullComparison = fieldCollation.nullDirection.nullComparison; final int x = fieldCollation.getFieldIndex(); switch (fieldCollation.direction) { case ASCENDING: return (o1, o2) -> { final Comparable c1 = (Comparable) o1.getValues()[x]; final Comparable c2 = (Comparable) o2.getValues()[x]; return RelFieldCollation.compare(c1, c2, nullComparison); }; default: return (o1, o2) -> { final Comparable c1 = (Comparable) o1.getValues()[x]; final Comparable c2 = (Comparable) o2.getValues()[x]; return RelFieldCollation.compare(c2, c1, -nullComparison); }; } } }
private Comparator<Row> comparator(RelFieldCollation fieldCollation) { final int nullComparison = fieldCollation.nullDirection.nullComparison; final int x = fieldCollation.getFieldIndex(); switch (fieldCollation.direction) { case ASCENDING: return (o1, o2) -> { final Comparable c1 = (Comparable) o1.getValues()[x]; final Comparable c2 = (Comparable) o2.getValues()[x]; return RelFieldCollation.compare(c1, c2, nullComparison); }; default: return (o1, o2) -> { final Comparable c1 = (Comparable) o1.getValues()[x]; final Comparable c2 = (Comparable) o2.getValues()[x]; return RelFieldCollation.compare(c2, c1, -nullComparison); }; } } }
@Override public Row apply(Row row) { final Object[] inValues = row.getValues(); for (int i = 0; i < rejectedProjects.size(); i++) { values[i] = inValues[rejectedProjects.get(i)]; } return Row.asCopy(values); } });
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); } } } }
@Override public Row apply(Row row) { final Object[] inValues = row.getValues(); for (int i = 0; i < rejectedProjects.size(); i++) { values[i] = inValues[rejectedProjects.get(i)]; } return Row.asCopy(values); } });
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)); } } } } }
final Context context = compiler.createContext(); enumerable = enumerable.where(row -> { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); return b != null && b;
final Context context = compiler.createContext(); enumerable = enumerable.where(row -> { context.values = row.getValues(); Boolean b = (Boolean) condition.execute(context); return b != null && b;