public class QDictionary extends ADictionary
| Constructor and Description |
|---|
QDictionary(BitmapLossy bm) |
| Modifier and Type | Method and Description |
|---|---|
double |
aggregate(double init,
Builtin fn)
Aggregate all the contained values, useful in value only computations where the operation is iterating through
all values contained in the dictionary.
|
QDictionary |
apply(ScalarOperator op)
Applies the scalar operation on the dictionary.
|
QDictionary |
applyScalarOp(ScalarOperator op,
double newVal,
int numCols)
Applies the scalar operation on the dictionary.
|
QDictionary |
clone()
Returns a deep clone of the dictionary.
|
long |
getExactSizeOnDisk()
Calculate the space consumption if the dictionary is stored on disk.
|
long |
getInMemorySize()
Returns the memory usage of the dictionary.
|
static long |
getInMemorySize(int valuesCount) |
int |
getNumberOfValues(int nCol)
Get the number of values given that the column group has n columns
|
double |
getScale() |
double |
getValue(int i)
Get Specific value contained in the dictionary at index.
|
byte |
getValueByte(int i) |
double[] |
getValues()
Get all the values contained in the dictionary as a linearized double array.
|
byte[] |
getValuesByte() |
int |
getValuesLength()
returns the count of values contained in the dictionary.
|
int |
hasZeroTuple(int ncol)
Determines if the content has a zero tuple.
|
static QDictionary |
read(DataInput in) |
void |
write(DataOutput out)
Write the dictionary to a DataOutput.
|
aggregateCols, readpublic QDictionary(BitmapLossy bm)
public double[] getValues()
ADictionarygetValues in class ADictionarypublic double getValue(int i)
ADictionarygetValue in class ADictionaryi - The index to extract the value frompublic byte getValueByte(int i)
public byte[] getValuesByte()
public double getScale()
public long getInMemorySize()
ADictionarygetInMemorySize in class ADictionarypublic static long getInMemorySize(int valuesCount)
public int hasZeroTuple(int ncol)
ADictionaryhasZeroTuple in class ADictionaryncol - The number of columns in the dictionary.public double aggregate(double init,
Builtin fn)
ADictionaryaggregate in class ADictionaryinit - The initial Value, in cases such as Max value, this could be -infinityfn - The Function to apply to valuespublic QDictionary apply(ScalarOperator op)
ADictionaryapply in class ADictionaryop - The operator to apply to the dictionary values.public QDictionary applyScalarOp(ScalarOperator op, double newVal, int numCols)
ADictionaryapplyScalarOp in class ADictionaryop - The operator to apply to the dictionary values.newVal - The value to append to the dictionary.numCols - The number of columns stored in the dictionary.public int getValuesLength()
ADictionarygetValuesLength in class ADictionarypublic QDictionary clone()
ADictionaryclone in class ADictionarypublic static QDictionary read(DataInput in) throws IOException
IOExceptionpublic void write(DataOutput out) throws IOException
ADictionarywrite in class ADictionaryout - the output sink to write the dictionary to.IOException - if the sink fails.public long getExactSizeOnDisk()
ADictionarygetExactSizeOnDisk in class ADictionarypublic int getNumberOfValues(int nCol)
ADictionarygetNumberOfValues in class ADictionarynCol - The number of Columns in the ColumnGroup.Copyright © 2020 The Apache Software Foundation. All rights reserved.