org.apache.hadoop.hive.ql.exec.vector.expressions
Class CuckooSetLong
java.lang.Object
org.apache.hadoop.hive.ql.exec.vector.expressions.CuckooSetLong
public class CuckooSetLong
- 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 (
Field Summary |
static int[] |
primes
|
Constructor Summary |
CuckooSetLong(int expectedSize)
Allocate a new set to hold expectedSize values. |
Method Summary |
void |
insert(long x)
|
void |
load(long[] a)
Insert all values in the input array into the set. |
boolean |
lookup(long x)
Return true if and only if the value x is present in the set. |
primes
public static int[] primes
CuckooSetLong
public CuckooSetLong(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 inserteed.
- Parameters:
expectedSize
- At least the size of the set of values that will be inserted.
lookup
public boolean lookup(long x)
- Return true if and only if the value x is present in the set.
insert
public void insert(long x)
load
public void load(long[] a)
- Insert all values in the input array into the set.
Copyright © 2014 The Apache Software Foundation. All rights reserved.