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
Modifier and TypeInterfaceDescriptionstatic enum
static interface
The interface for visitors.static interface
The information about each node. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
add
(byte[] bytes, int offset, int length) void
clear()
long
getText
(int position) void
Given the position index, return the original string before being encoded.int
size()
void
visit
(Dictionary.Visitor visitor) Traverse the whole dictionary and apply the action.int
writeTo
(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()
-