@Override public int getCount() { return wrap.getCount(); }
@Override public int getCount() { return mergedBundle.getCount(); }
@Override public Bundle rowOp(Bundle row) { if (col < row.getCount()) { BundleColumnBinder binder = getSourceColumnBinder(row); ValueObject oldval = binder.getColumn(row, col); if (oldval != null) { for (Map.Entry<Pattern, ValueString> entry : map.entrySet()) { if (entry.getKey().matcher(oldval.toString()).matches()) { binder.setColumn(row, col, entry.getValue()); //break; } } } } return row; } }
@Override public Bundle rowOp(Bundle row) { if (col < row.getCount()) { BundleColumnBinder binder = getSourceColumnBinder(row); ValueObject val = binder.getColumn(row, col); for (String elt : contains) { if (elt.length() > 0 && val.toString().indexOf(elt) != -1) { binder.setColumn(row, col, val); return row; } } return null; } return row; } }
@Override public Bundle rowOp(Bundle row) { if (col < row.getCount()) { BundleColumnBinder binder = getSourceColumnBinder(row); ValueObject oldval = binder.getColumn(row, col); if (oldval != null) { ValueString newval = map.get(oldval.toString()); if (newval != null || mapToNull) { binder.setColumn(row, col, newval); } } } return row; } }
@Override public Bundle rowOp(Bundle row) { Bundle rowClone = row; if (last != null) { BundleColumnBinder binder = getSourceColumnBinder(row); boolean modified = false; for (int i = 0; i < last.getCount() && row.getCount() > i; i++) { ValueObject a = binder.getColumn(last, i); ValueObject b = binder.getColumn(row, i); if (a == null || b == null) { continue; } if (a.toString().equals(b.toString())) { if (modified == false) { rowClone = cloneBundle(row); } binder.setColumn(row, i, null); modified = true; } } } last = rowClone; return row; }
@Override public Bundle rowOp(Bundle row) { if (col < row.getCount()) { long valLong = 0; BundleColumnBinder binder = getSourceColumnBinder(row); ValueObject val = binder.getColumn(row, col); try { valLong = Long.parseLong(val.toString()); } catch (Exception ex) { ex.printStackTrace(); } if (performOp(valLong, compValue, op)) { binder.setColumn(row, col, val); return row; } else { return null; } } return row; }
private long getBundleTime(Bundle bundle) { long bundleTime = JitterClock.globalTime(); if (timeField != null) { ValueObject vo = timeField.getField().getValue(bundle); if (vo == null) { log.debug("missing time {} in [{}] --> {}", timeField.getField(), bundle.getCount(), bundle); } else { bundleTime = timeField.toUnix(vo); } } return bundleTime; }
out = ValueFactory.create(outFormat.print(dt)); if (outcol >= row.getCount()) { binder.appendColumn(row, out); } else {
public void processRow(Bundle row) throws QueryException { rowsin++; cellsin += row.getCount(); if ((opPromise != null) && !opPromise.isDone()) { firstOp.send(row); } if ((OP_MAXROWS > 0) && (rowsin > OP_MAXROWS)) { throw new QueryException("query exceeded max input rows: " + OP_MAXROWS); } if ((OP_MAXCELLS > 0) && (cellsin > OP_MAXCELLS)) { throw new QueryException("query exceeded max input cells: " + OP_MAXCELLS); } }
@Override public Bundle rowOp(Bundle row) { LinkedList<ValueObject> stack = new LinkedList<>(); long maxcol = row.getCount() - 1; for (StringOp op : ops) { switch (op.type) {
if (row.getCount() < max) { continue;
int index = 1 + colValues.indexOf(binder.getColumn(row, inputCol).asLong().getLong()); ValueObject rank = ValueFactory.create((double) index / colValues.size()); if (outputCol >= row.getCount()) { binder.appendColumn(row, rank); } else {
newrow.setValue(colField, col); if (valcol != null && row.getCount() > pos) { newrow.setValue(valField, rowView.get(pos));
public Bundle calculate(Bundle line) { LinkedList<Numeric> stack = new LinkedList<>(); long maxcol = line.getCount() - 1; try { for (MathOp op : ops) {