@Override public Object getValueInRow( RowAccessor row ) { Long right = commonTypeFactory.create(rightOp.getValueInRow(row)); Long left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null || left == null) return null; return left.longValue() / right.longValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Double right = commonTypeFactory.create(rightOp.getValueInRow(row)); Double left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) left = 0.0d; return left.doubleValue() * right.doubleValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Double right = commonTypeFactory.create(rightOp.getValueInRow(row)); Double left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) return right; return left.doubleValue() / right.doubleValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Object value = extractor.getValueInRow(row); if (value == null) return value; if (value instanceof Object[]) { Object[] values = (Object[])value; for (int i = 0; i != values.length; ++i) { values[i] = newType.create(values[i]); } return values; } return newType.create(extractor.getValueInRow(row)); }
@Override public Object getValueInRow( RowAccessor row ) { Long right = commonTypeFactory.create(rightOp.getValueInRow(row)); Long left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) return right; return left.longValue() / right.longValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Object typedValue = getPropValue.getValueInRow(row); return getPropValue.getType().length(typedValue); }
@Override public boolean isCurrentRowValid( Batch batch ) { Object key = keyExtractor.getValueInRow(batch); if (!rowsSeen.addIfAbsent(key)) { if (trace) LOGGER.trace("Distinct found existing key: {0}", key); return false; } if (trace) LOGGER.trace("Distinct found new key: {0}", key); return true; } };
@SuppressWarnings( "synthetic-access" ) @Override public void verify( RowAccessor currentRow ) { Object leftValue = leftExtractor.getValueInRow(currentRow); Object rightValue = rightExtractor.getValueInRow(currentRow); print("Found [" + leftValue + ", " + rightValue + "] " + rowAsString(currentRow)); assertThat(leftValue, is(rightValue)); }
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row)); } };
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row), third.getValueInRow(row)); } };
@Override public Object getValueInRow( RowAccessor row ) { Long right = commonTypeFactory.create(rightOp.getValueInRow(row)); Long left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) return right; return left.longValue() / right.longValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Double right = commonTypeFactory.create(rightOp.getValueInRow(row)); Double left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) left = 0.0d; return left.doubleValue() * right.doubleValue(); }
@Override public void nextRow() { // This current presumes that 'hasNext' was called and that either 'rightMatchingRows' is null (because there // was no match (e.g., left outer join) or that it is non-null and has at least one value ... if (rightMatchingRows != null) { currentRight = rightMatchingRows.next(); // since there might be multiple rows on the right, we need to make sure we record each one recordRightRowsMatched(extractor.getValueInRow(currentRight)); } else { currentRight = null; } }
@SuppressWarnings( "synthetic-access" ) @Override public void verify( RowAccessor currentRow ) { Object leftValue = leftExtractor.getValueInRow(currentRow); Object rightValue = rightExtractor.getValueInRow(currentRow); print("Found [" + leftValue + ", " + rightValue + "] " + rowAsString(currentRow)); if (leftValue == null) return; // RIGHT OUTER JOIN assertThat(leftValue, is(rightValue)); }
@Override public Object getValueInRow( RowAccessor row ) { Long right = commonTypeFactory.create(rightOp.getValueInRow(row)); Long left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null || left == null) return null; return left.longValue() / right.longValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Long right = commonTypeFactory.create(rightOp.getValueInRow(row)); Long left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null || left == null) return null; return left.longValue() * right.longValue(); }
@Override public Object getValueInRow( RowAccessor row ) { Double right = commonTypeFactory.create(rightOp.getValueInRow(row)); Double left = commonTypeFactory.create(leftOp.getValueInRow(row)); if (right == null) return left; if (left == null) return right; return left.doubleValue() / right.doubleValue(); }
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row), third.getValueInRow(row), fourth.getValueInRow(row)); } };
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row), third.getValueInRow(row)); } };
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row), third.getValueInRow(row), fourth.getValueInRow(row)); } };