com.vertica.sdk.BlockWriter Class Reference
Inheritance diagram for com.vertica.sdk.BlockWriter:
Collaboration diagram for com.vertica.sdk.BlockWriter:
| Public Member Functions | |
|---|---|
| BlockWriter (int rowcount, VerticaType returnType) | |
| 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) |
| ByteBuffer | getColDataAreaRef (int idx) |
| ByteBuffer | getColRef (int idx) |
| int | getNumCols () |
| int | getNumRows () |
| BaseDataOID | getProcessBlockUserInfoVectorAt (int i) |
| SizedColumnTypes | getTypeMetaData () |
| VString | getVStringWriter () |
| Allocates a new VString object to use as output. | |
| void | next () |
| Complete writing this row of output and move to the next row. | |
| void | resetBuffers () |
| void | setBoolean (boolean r) |
| Adds a BOOLEAN value to the output row. | |
| void | setBooleanNull () |
| Adds NULL as a BOOLEAN value to the output row. | |
| void | setDate (java.sql.Date r) |
| Adds a DATE value to the output row. | |
| void | setDateNull () |
| Adds NULL as a DATE value to the output row. | |
| void | setDouble (double r) |
| Adds a DOUBLE value to the output row. | |
| void | setDoubleNull () |
| Adds NULL as a DOUBLE value to the output row. | |
| void | setLong (long r) |
| Adds a LONG INTEGER value to the output row. | |
| void | setLongNull () |
| Adds NULL as a LONG INTEGER value to the output row. | |
| void | setNumeric (BigDecimal bd) |
| Allocate a new VNumeric object to use as output. | |
| void | setNumericNull () |
| void | setString (String r) |
| Adds a String value to the output row. | |
| void | setStringNull () |
| Adds NULL as a String value to the output row. | |
| void | setTimestamp (java.sql.Timestamp r) |
| Adds a TIMESTAMP value to the output row. | |
| void | setTimestampInfiniteNeg () |
| Adds a '-infinity' TIMESTAMP value to the output row. | |
| void | setTimestampInfinitePos () |
| Adds a '+infinity' TIMESTAMP value to the output row. | |
| void | setTimestampNull () |
| Adds NULL as a TIMESTAMP value to the output row. | |
| void | throwInCorrectUsageError () |
| : Throwing UdfException for incorrect setter usage |
| Public Attributes | |
|---|---|
| int | count |
| int | index |
| int | ncols |
| int | nrows |
| SizedColumnTypes | typeMetaData |
| Protected Member Functions | |
|---|---|
| void | clear () |
| ByteBuffer | getInlineColBuffer (int idx) |
| Protected Attributes | |
|---|---|
| ArrayList | coldataareas |
| ArrayList | cols |
| ArrayList | colstrides |
| ArrayList | currentPos |
Detailed Description
Iterator interface for writing rows to a Vertica block
This class provides the output rows that ScalarFunction.processBlock() writes to.
Member Function Documentation
◆addCol() [1/4]
void com.vertica.sdk.VerticaBlock.addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
inherited Add the location for reading a particular argument.
Parameters
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().
◆addCol() [2/4]
void com.vertica.sdk.VerticaBlock.addCol(ByteBuffer arg, int colstride, VerticaType dt)
inherited Add the location for reading a particular argument.
Parameters
arg: The base location to find data.colstride: The stride between data instances.dt: The type of input.
◆addCol() [3/4]
void com.vertica.sdk.VerticaBlock.addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
inherited Add the location for reading a particular argument.
Parameters
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.
◆addCol() [4/4]
void com.vertica.sdk.VerticaBlock.addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
inherited Add the location for reading a particular argument.
Parameters
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
◆getColDataAreaRef()
ByteBuffer com.vertica.sdk.VerticaBlock.getColDataAreaRef(int idx)
inherited Get the ByteBuffer that stores out of line string data (Data Area) for the idx'th argument
Parameters
idx: The column number to retrieve from the input row.
Returns the ByteBuffer
Referenced by com.vertica.sdk.BlockReader.getVString().
◆getColRef()
ByteBuffer com.vertica.sdk.VerticaBlock.getColRef(int idx)
inherited Example
ByteBuffer a = arg_reader.getColPtr(0);
Parameters
idx: The column number to retrieve from the input row.
Returns a ByteBuffer to the idx'th argument, containing data for the column
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.setLong()
- com.vertica.sdk.ParamWriter.setLong()
- 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()
- com.vertica.sdk.PartitionWriter.setTimestampValue()
◆getInlineColBuffer()
ByteBuffer com.vertica.sdk.VerticaBlock.getInlineColBuffer(int idx)
protected inherited 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.
Parameters
idx: The column number to retrieve from the input row.
Returns the ByteBuffer for the column
Referenced by
◆getNumCols()
int com.vertica.sdk.VerticaBlock.getNumCols()
inherited Returns the number of arguments held by this reader.
◆getNumRows()
int com.vertica.sdk.VerticaBlock.getNumRows()
inherited Returns the number of rows held by this block.
◆getTypeMetaData()
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited Returns information about the types and numbers of arguments
Referenced by
- com.vertica.sdk.ParamReader.getType()
- com.vertica.sdk.PartitionWriter.setRowFromMap()
- com.vertica.sdk.PartitionWriter.setValue()
◆getVStringWriter()
VString com.vertica.sdk.BlockWriter.getVStringWriter()
Allocates a new VString object to use as output.
Returns A new VString object to hold output. This object automatically added to the output row.
◆next()
void com.vertica.sdk.BlockWriter.next()
Complete writing this row of output and move to the next row.
◆setBoolean()
void com.vertica.sdk.BlockWriter.setBoolean(boolean r)
Adds a BOOLEAN value to the output row.
Parameters
r: The BOOLEAN value to insert into the output row.
◆setDate()
void com.vertica.sdk.BlockWriter.setDate(java.sql.Date r)
Adds a DATE value to the output row.
Parameters
r: The DATE value to insert into the output row.
◆setDouble()
void com.vertica.sdk.BlockWriter.setDouble(double r)
Adds a DOUBLE value to the output row.
Parameters
r: The DOUBLE value to insert into the output row.
◆setLong()
void com.vertica.sdk.BlockWriter.setLong(long r)
Adds a LONG INTEGER value to the output row.
Parameters
r: The LONG INTEGER value to insert into the output row.
◆setNumeric()
void com.vertica.sdk.BlockWriter.setNumeric(BigDecimal bd)
Allocate a new VNumeric object to use as output.
Returns A new VNumeric object to hold output. This object automatically added to the output row.
◆setString()
void com.vertica.sdk.BlockWriter.setString(String r)
Adds a String value to the output row.
Parameters
r: The String value to insert into the output row.
◆setTimestamp()
void com.vertica.sdk.BlockWriter.setTimestamp(java.sql.Timestamp r)
Adds a TIMESTAMP value to the output row.
Parameters
r: The TIMESTAMP value to insert into the output row.