Package org.apache.druid.data.input
Class ListBasedInputRowAdapter
- java.lang.Object
-
- org.apache.druid.data.input.ListBasedInputRowAdapter
-
- All Implemented Interfaces:
RowAdapter<InputRow>
public class ListBasedInputRowAdapter extends Object implements RowAdapter<InputRow>
Adapter for readingListBasedInputRow. TheRowAdapters.standardRow()would also work, but this one is faster because it avoids per-row field-name-to-index lookups. Must be instantiated with the sameRowSignatureas theListBasedInputRowthat are to be parsed.
-
-
Constructor Summary
Constructors Constructor Description ListBasedInputRowAdapter(RowSignature fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Function<InputRow,Object>columnFunction(String columnName)Returns a function that retrieves the value for column "columnName" from rows.ToLongFunction<InputRow>timestampFunction()Returns a function that retrieves timestamps from rows.
-
-
-
Constructor Detail
-
ListBasedInputRowAdapter
public ListBasedInputRowAdapter(RowSignature fields)
-
-
Method Detail
-
timestampFunction
public ToLongFunction<InputRow> timestampFunction()
Description copied from interface:RowAdapterReturns a function that retrieves timestamps from rows. The default implementation delegates toRowAdapter.columnFunction(java.lang.String)and expects it to already contain long-typed values or nulls. Nulls, if present, will be converted to zeroes.- Specified by:
timestampFunctionin interfaceRowAdapter<InputRow>
-
columnFunction
public Function<InputRow,Object> columnFunction(String columnName)
Description copied from interface:RowAdapterReturns a function that retrieves the value for column "columnName" from rows.- Specified by:
columnFunctionin interfaceRowAdapter<InputRow>
-
-