![]() |
Java SDK Documentation
8.1
|
Iterator interface for reading rows in a Vertica block. More...
Public Member Functions | |
void | addCol (ByteBuffer arg, int colstride, VerticaType dt, String colName) |
void | addCol (ByteBuffer arg, int colstride, VerticaType dt) |
void | addCol (ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt) |
void | addCol (ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName) |
boolean | checkStringUserBlockInfo (int idx) |
boolean | checkTimeUserBlockInfo (int idx) |
boolean | getBoolean (int idx) |
Get a BOOLEAN value from the input row. More... | |
ByteBuffer | getColDataAreaRef (int idx) |
ByteBuffer | getColRef (int idx) |
java.sql.Date | getDate (int idx) |
Get a DATE value from the input row. More... | |
double | getDouble (int idx) |
Get a DOUBLE value from the input row. More... | |
long | getLong (int idx) |
Get a LONG INTEGER value from the input row. More... | |
int | getNumCols () |
int | getNumRows () |
BaseDataOID | getProcessBlockUserInfoVectorAt (int i) |
String | getString (int idx) |
Get a reference to an VARCHAR/CHAR/VARBINARY/BINARY value from the input row. More... | |
int | getStringLength (int idx) |
Get length of the String from the input row. More... | |
int | getStringLoc (int idx) |
Get 'location' of the String from the input row. More... | |
java.sql.Timestamp | getTimestamp (int idx) |
Get a TIMESTAMP value from the input row. More... | |
SizedColumnTypes | getTypeMetaData () |
VNumeric | getVNumeric (int idx) |
Get a reference to a VNumeric value from the input row. More... | |
VString | getVString (int idx) |
Get a reference from the input row to an VString value, which represents a SQL VARCHAR/CHAR/VARBINARY/BINARY value. More... | |
boolean | isBooleanNull (int idx) |
Check whether a value from the input row is NULL in BOOLEAN type. More... | |
boolean | isDateNull (int idx) |
Check whether a value from the input row is NULL in DATE type. More... | |
boolean | isDoubleNull (int idx) |
Check whether a value from the input row is NULL in DOUBLE type. More... | |
boolean | isLongNull (int idx) |
Check whether a value from the input row is NULL in LONG INTERGER type. More... | |
boolean | isStringNull (int idx) |
Check whether a value from the input row is NULL in SQL VARCHAR/CHAR/VARBINARY/BINARY type. More... | |
boolean | isTimestampInfinite (int idx) |
Check whether a TIMESTAMP value from the input row represents 'infinity'. More... | |
boolean | isTimestampInfiniteNeg (int idx) |
Check whether a TIMESTAMP value from the input row represents '-infinity'. More... | |
boolean | isTimestampInfinitePos (int idx) |
Check whether a TIMESTAMP value from the input row represents '+infinity'. More... | |
boolean | isTimestampNull (int idx) |
Check whether a value from the input row is NULL in TIMESTAMP type. More... | |
boolean | next () throws UdfException, DestroyInvocation |
void | resetBuffers () |
Public Attributes | |
int | count |
int | index |
int | ncols |
int | nrows |
SizedColumnTypes | typeMetaData |
Protected Member Functions | |
BlockReader (int _ncols, int _rowcount) | |
void | clear () |
ByteBuffer | getInlineColBuffer (int idx) |
Protected Attributes | |
ArrayList< ByteBuffer > | coldataareas |
ArrayList< ByteBuffer > | cols |
ArrayList< Integer > | colstrides |
ArrayList< Integer > | currentPos |
Iterator interface for reading rows in a Vertica block.
This class provides the input to the ScalarFunction.processBlock() function. You extract values from the input row using data type specific functions to extract each column value. You can also determine the number of columns and their data types, if your processBlock function does not have hard-coded input expectations.
|
inherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
colstride | The stride between data instances. |
dt | The type of input. |
colName | Name of the column |
Referenced by com.vertica.sdk.VerticaBlock.addCol().
|
inherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
colstride | The stride between data instances. |
dt | The type of input. |
|
inherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
da | The location to find out of band string data. |
colstride | The stride between data instances. |
dt | The type of input. |
|
inherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
da | The location to find out of band string data. |
colstride | The stride between data instances. |
dt | The type of input. |
colName | Name of the column |
boolean com.vertica.sdk.BlockReader.getBoolean | ( | int | idx | ) |
Get a BOOLEAN value from the input row.
idx | The column number to retrieve from the input row. |
|
inherited |
Get the ByteBuffer that stores out of line string data (Data Area) for the idx'th argument
idx |
Referenced by com.vertica.sdk.BlockReader.getVString().
|
inherited |
Example:
Referenced by com.vertica.sdk.PartitionWriter.copyFromInput(), com.vertica.sdk.BlockReader.getBoolean(), com.vertica.sdk.BlockReader.getDouble(), com.vertica.sdk.VerticaBlock.getInlineColBuffer(), com.vertica.sdk.BlockReader.getLong(), com.vertica.sdk.BlockReader.getStringLength(), com.vertica.sdk.BlockReader.getStringLoc(), com.vertica.sdk.BlockReader.getVNumeric(), com.vertica.sdk.BlockReader.getVString(), com.vertica.sdk.BlockWriter.getVStringWriter(), com.vertica.sdk.BlockReader.isBooleanNull(), com.vertica.sdk.ParamWriter.setBool(), com.vertica.sdk.BlockWriter.setBoolean(), com.vertica.sdk.BlockWriter.setBooleanNull(), com.vertica.sdk.PartitionWriter.setBooleanValue(), com.vertica.sdk.BlockWriter.setDate(), com.vertica.sdk.BlockWriter.setDateNull(), com.vertica.sdk.PartitionWriter.setDateValue(), com.vertica.sdk.BlockWriter.setDouble(), com.vertica.sdk.ParamWriter.setDouble(), com.vertica.sdk.BlockWriter.setDoubleNull(), com.vertica.sdk.PartitionWriter.setDoubleValue(), com.vertica.sdk.BlockWriter.setLongNull(), com.vertica.sdk.ParamWriter.setLongString(), com.vertica.sdk.PartitionWriter.setLongValue(), com.vertica.sdk.ParamWriter.setNumeric(), com.vertica.sdk.BlockWriter.setNumeric(), com.vertica.sdk.ParamWriter.setString(), com.vertica.sdk.BlockWriter.setString(), com.vertica.sdk.BlockWriter.setStringNull(), com.vertica.sdk.BlockWriter.setTimestamp(), com.vertica.sdk.BlockWriter.setTimestampInfiniteNeg(), com.vertica.sdk.BlockWriter.setTimestampInfinitePos(), com.vertica.sdk.BlockWriter.setTimestampNull(), and com.vertica.sdk.PartitionWriter.setTimestampValue().
java.sql.Date com.vertica.sdk.BlockReader.getDate | ( | int | idx | ) |
Get a DATE value from the input row.
idx | The column number to retrieve from the input row. |
double com.vertica.sdk.BlockReader.getDouble | ( | int | idx | ) |
Get a DOUBLE value from the input row.
idx | The column number to retrieve from the input row. |
|
protectedinherited |
Give a ByteBuffer for the given column (inline storage only). Returns a buffer with position and limit bounding the data area for a single element of that column, given the current position in the column.
Referenced by com.vertica.sdk.PartitionWriter.setStringBytes(), and com.vertica.sdk.PartitionWriter.setStringValue().
long com.vertica.sdk.BlockReader.getLong | ( | int | idx | ) |
Get a LONG INTEGER value from the input row.
idx | The column number to retrieve from the input row. |
Example:
Referenced by com.vertica.sdk.BlockReader.getDate(), com.vertica.sdk.BlockReader.getTimestamp(), com.vertica.sdk.BlockReader.isDoubleNull(), com.vertica.sdk.BlockReader.isLongNull(), com.vertica.sdk.BlockReader.isTimestampInfiniteNeg(), and com.vertica.sdk.BlockReader.isTimestampInfinitePos().
|
inherited |
|
inherited |
String com.vertica.sdk.BlockReader.getString | ( | int | idx | ) |
Get a reference to an VARCHAR/CHAR/VARBINARY/BINARY value from the input row.
idx | The column number to retrieve from the input row. |
int com.vertica.sdk.BlockReader.getStringLength | ( | int | idx | ) |
Get length of the String from the input row.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getVString(), and com.vertica.sdk.BlockReader.isStringNull().
int com.vertica.sdk.BlockReader.getStringLoc | ( | int | idx | ) |
Get 'location' of the String from the input row.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getVString().
java.sql.Timestamp com.vertica.sdk.BlockReader.getTimestamp | ( | int | idx | ) |
Get a TIMESTAMP value from the input row.
idx | The column number to retrieve from the input row. |
|
inherited |
Referenced by com.vertica.sdk.ParamReader.getType(), com.vertica.sdk.PartitionWriter.setRowFromMap(), and com.vertica.sdk.PartitionWriter.setValue().
VNumeric com.vertica.sdk.BlockReader.getVNumeric | ( | int | idx | ) |
Get a reference to a VNumeric value from the input row.
idx | The column number to retrieve from the input row. |
VString com.vertica.sdk.BlockReader.getVString | ( | int | idx | ) |
Get a reference from the input row to an VString value, which represents a SQL VARCHAR/CHAR/VARBINARY/BINARY value.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getString().
boolean com.vertica.sdk.BlockReader.isBooleanNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in BOOLEAN type.
idx | The column number to retrieve from the input row. |
boolean com.vertica.sdk.BlockReader.isDateNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in DATE type.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getDate().
boolean com.vertica.sdk.BlockReader.isDoubleNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in DOUBLE type.
idx | The column number to retrieve from the input row. |
boolean com.vertica.sdk.BlockReader.isLongNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in LONG INTERGER type.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.isDateNull(), and com.vertica.sdk.BlockReader.isTimestampNull().
boolean com.vertica.sdk.BlockReader.isStringNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in SQL VARCHAR/CHAR/VARBINARY/BINARY type.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getString().
boolean com.vertica.sdk.BlockReader.isTimestampInfinite | ( | int | idx | ) |
Check whether a TIMESTAMP value from the input row represents 'infinity'.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getTimestamp().
boolean com.vertica.sdk.BlockReader.isTimestampInfiniteNeg | ( | int | idx | ) |
Check whether a TIMESTAMP value from the input row represents '-infinity'.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.isTimestampInfinite().
boolean com.vertica.sdk.BlockReader.isTimestampInfinitePos | ( | int | idx | ) |
Check whether a TIMESTAMP value from the input row represents '+infinity'.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.isTimestampInfinite().
boolean com.vertica.sdk.BlockReader.isTimestampNull | ( | int | idx | ) |
Check whether a value from the input row is NULL in TIMESTAMP type.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getTimestamp().
boolean com.vertica.sdk.BlockReader.next | ( | ) | throws UdfException, DestroyInvocation |
Advance to the next record.