Class LazyRow
- java.lang.Object
-
- org.apache.pinot.segment.local.segment.readers.LazyRow
-
public class LazyRow extends Object
A wrapper class to read column values of a row for a given
IndexSegmentand docId.
The advantage of having wrapper over segment and docId is column values are read only whengetValue(String)is invoked. This is useful to reduce the disk reads incurred due to loading the complete previous row during merge step.The LazyRow has an internal state and should not be used concurrently. To reuse the LazyRow, create an instance using no arg constructor and re-initialise using
init(IndexSegment, int)
-
-
Constructor Summary
Constructors Constructor Description LazyRow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Set<String>getColumnNames()ObjectgetValue(String fieldName)Computes a field's value in an indexed row.voidinit(IndexSegment segment, int docId)booleanisNullValue(String fieldName)
-
-
-
Method Detail
-
init
public void init(IndexSegment segment, int docId)
-
getValue
@Nullable public Object getValue(String fieldName)
Computes a field's value in an indexed row.- Parameters:
fieldName-- Returns:
- Returns value or null for persisted null values
-
isNullValue
public boolean isNullValue(String fieldName)
-
clear
public void clear()
-
-