@Override public void addRow(List<Object> t) { if (dummyRow != null || hashMapResult.hasRows()) { throw new RuntimeException("Cannot add rows when not empty"); } dummyRow = t; }
@Override public boolean isSingleRow() { if (!hashMapResult.hasRows()) { return (dummyRow != null); } return hashMapResult.isSingleRow(); }
public JoinUtil.JoinResult setFromOutput(Output output) { aliasFilter = hashMap.getValueResult(output.getData(), 0, output.getLength(), hashMapResult); dummyRow = null; if (hashMapResult.hasRows()) { return JoinUtil.JoinResult.MATCH; } else { aliasFilter = (byte) 0xff; return JoinUtil.JoinResult.NOMATCH; } }
public JoinUtil.JoinResult setDirect( byte[] bytes, int offset, int length, BytesBytesMultiHashMap.Result hashMapResult) { int keyHash = WriteBuffers.murmurHash(bytes, offset, length); aliasFilter = hashMap.getValueResult(bytes, offset, length, hashMapResult); dummyRow = null; if (hashMapResult.hasRows()) { return JoinUtil.JoinResult.MATCH; } else { aliasFilter = (byte) 0xff; return JoinUtil.JoinResult.NOMATCH; } }
@Override public boolean hasRows() { return hashMapResult.hasRows() || (dummyRow != null); }