org.apache.hadoop.hive.ql.exec.vector.expressions
Class CuckooSetBytes
java.lang.Object
org.apache.hadoop.hive.ql.exec.vector.expressions.CuckooSetBytes
public class CuckooSetBytes
- extends Object
A high-performance set implementation used to support fast set membership testing,
using Cuckoo hashing. This is used to support fast tests of the form
column IN (
Constructor Summary |
CuckooSetBytes(int expectedSize)
Allocate a new set to hold expectedSize values. |
Method Summary |
void |
insert(byte[] x)
|
void |
load(byte[][] a)
Insert all values in the input array into the set. |
boolean |
lookup(byte[] b,
int start,
int len)
Return true if and only if the value in byte array b beginning at start
and ending at start+len is present in the set. |
CuckooSetBytes
public CuckooSetBytes(int expectedSize)
- Allocate a new set to hold expectedSize values. Re-allocation to expand
the set is not implemented, so the expected size must be at least the
size of the set to be inserted.
- Parameters:
expectedSize
- At least the size of the set of values that will be inserted.
lookup
public boolean lookup(byte[] b,
int start,
int len)
- Return true if and only if the value in byte array b beginning at start
and ending at start+len is present in the set.
insert
public void insert(byte[] x)
load
public void load(byte[][] a)
- Insert all values in the input array into the set.
Copyright © 2014 The Apache Software Foundation. All rights reserved.