Package org.apache.orc.impl
Interface Dictionary
- All Known Implementing Classes:
StringHashTableDictionary,StringRedBlackTree
public interface Dictionary
Interface to define the dictionary used for encoding value in columns
of specific types like string, char, varchar, etc.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic interfaceThe interface for visitors.static interfaceThe information about each node. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintadd(byte[] bytes, int offset, int length) voidclear()longgetText(int position) voidGiven the position index, return the original string before being encoded.intsize()voidvisit(Dictionary.Visitor visitor) Traverse the whole dictionary and apply the action.intwriteTo(OutputStream out, int position) Given the position index, write the original string, before being encoded, to the OutputStream.
-
Field Details
-
INITIAL_DICTIONARY_SIZE
static final int INITIAL_DICTIONARY_SIZE- See Also:
-
-
Method Details
-
visit
Traverse the whole dictionary and apply the action.- Throws:
IOException
-
clear
void clear() -
getText
Given the position index, return the original string before being encoded. The value of the Text in the Dictionary is copied intoresult.- Parameters:
result- the holder to copy the dictionary text intoposition- the position where the key was added
-
getText
-
writeTo
Given the position index, write the original string, before being encoded, to the OutputStream.- Parameters:
out- the output stream to which to write the dataposition- the position where the key was originally added- Returns:
- the number of byte written to the stream
- Throws:
IOException- if an I/O error occurs
-
add
int add(byte[] bytes, int offset, int length) -
size
int size() -
getSizeInBytes
long getSizeInBytes()
-