Java SDK Documentation
23.3.0
|
Public Member Functions | |
AnalyticPartitionWriter (int nargs) | |
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) |
void | copyFromInput (int dstIdx, PartitionReader input_reader, int srcIdx) throws UdfException |
ByteBuffer | getColDataAreaRef (int idx) |
ByteBuffer | getColRef (int idx) |
TypeCoercion | getDefaultTypeCoercion () |
int | getNumCols () |
VNumeric | getNumericWriter (int idx) |
int | getNumRows () |
BaseDataOID | getProcessBlockUserInfoVectorAt (int i) |
VString | getStringWriter (int idx) |
SizedColumnTypes | getTypeMetaData () |
abstract boolean | getWriteableBlock () throws UdfException, DestroyInvocation |
boolean | next () throws UdfException, DestroyInvocation |
void | resetBuffers () |
void | setBoolean (int idx, boolean r) |
void | setBooleanNull (int idx) |
void | setBooleanValue (int idx, Boolean value) |
void | setDate (int idx, java.sql.Date r) |
void | setDateNull (int idx) |
void | setDateValue (int idx, java.sql.Date value) |
TypeCoercion | setDefaultTypeCoercion (TypeCoercion coerce) |
void | setDouble (int idx, double r) |
void | setDoubleNull (int idx) |
void | setDoubleValue (int idx, Double value) |
void | setLong (int idx, long r) |
void | setLongNull (int idx) |
void | setLongValue (int idx, Long value) |
void | setNumeric (int idx, BigDecimal bd) |
void | setNumericNull (int idx) |
void | setNumericValue (int idx, BigDecimal value) |
void | setRowFromMap (Map< String,?> rowData) |
void | setRowFromMap (Map< String,?> rowData, TypeCoercion coerce) |
void | setString (int idx, String r) |
void | setStringBytes (int idx, ByteBuffer bytes) |
void | setStringNull (int idx) |
void | setStringValue (int idx, String value) |
void | setTimestamp (int idx, java.sql.Timestamp r) |
void | setTimestampInfiniteNeg (int idx) |
void | setTimestampInfinitePos (int idx) |
void | setTimestampNull (int idx) |
void | setTimestampValue (int idx, java.sql.Timestamp value) |
void | setValue (int idx, Object value, TypeCoercion coerce) |
void | setVMap (int idx, Map< String,?> data) |
void | setVMap (int idx, Map< String,?> data, TypeCoercion coerce) |
void | throwInCorrectUsageError (int idx) |
: 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) |
long | getRowSize (SizedColumnTypes types) |
void | setRowCount (SizedColumnTypes types) |
Static Protected Member Functions | |
static long | blockSizeGivenRowSize (long row_size) |
Protected Attributes | |
ArrayList< ByteBuffer > | coldataareas |
ArrayList< ByteBuffer > | cols |
ArrayList< Integer > | colstrides |
ArrayList< Integer > | currentPos |
Partition writer for all input data in a single partition. It automatically makes space as needed.
|
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 |
|
inherited |
Copies a column from the input reader to the output writer. The data types and sizes of the source and destination columns must match exactly.
dstIdx | The destination column index (in the output writer) |
input_reader | The input reader from which to copy a column |
srcIdx | The source column index (in the input reader) |
|
inherited |
Get the ByteBuffer that stores out of line string data (Data Area) for the idx'th argument
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.BlockReader.getVString().
|
inherited |
Example: ByteBuffer a = arg_reader.getColPtr(0);
idx | The column number to retrieve from the input row. |
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(), and com.vertica.sdk.PartitionWriter.setTimestampValue().
|
inherited |
Give the default TypeCoercion instance, creating one if necessary. This may be useful in cases where the calling code would like to change the TypeCoercionPolicy or do TypeCoercion in the same manner as this PartitionWriter.
If a TypeCoercion is created, it is an instance of StandardTypeCoercion.
Referenced by com.vertica.sdk.PartitionWriter.setRowFromMap(), and com.vertica.sdk.PartitionWriter.setVMap().
|
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.
idx | The column number to retrieve from the input row. |
Referenced by com.vertica.sdk.PartitionWriter.setStringBytes(), and com.vertica.sdk.PartitionWriter.setStringValue().
|
inherited |
|
inherited |
|
inherited |
Referenced by com.vertica.sdk.ParamReader.getType(), com.vertica.sdk.PartitionWriter.setRowFromMap(), and com.vertica.sdk.PartitionWriter.setValue().
|
pure virtual |
Gets a writeable block of data and positions cursor at the beginning.
UdfException | UDF problem |
DestroyInvocation | Invocation needed to be destroyed |
Implements com.vertica.sdk.PartitionWriter.
|
inherited |
Set a Boolean value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set a Date value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set the default type coercion instance.
coerce | A TypeCoercion instance. |
|
inherited |
Set a Double value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set a Long value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set a Numeric value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Sets all columns on the current row according to the data provided, using the column names to match the data keys. See setRowFromMap(Map, TypeCoercion) for more details. This is a shortcut for using the default type coercion.
rowData | The data. Null data is treated as empty. |
|
inherited |
Sets all columns on the current row according to the data provided, using the column names to match the data keys.
For each column, TypeCoercion will be used to convert a value in rowData to the appropriate type for that column. This is done via setValue and may cause a TypeCoercion exception.
To find the corresponding value, the 'first' matching key (according to case-insensitive SQL identifier matching) in the map will be used. 'first' is not well defined, but is consistent.
If no corresponding value is found, the column will be set to null. This never raises an exception, regardless of the target column type. That is, FAIL_SDK_UNSUPPORTED_TYPE is ignored in that case.
In addition, if the target row structure appears to be a flex table, the necessary internal structures will be populated with an encoded vmap via setVMap(int, Map, TypeCoercion).
rowData | The data. Null data is treated as empty. |
coerce | The implementation of coercion |
|
inherited |
Set a String value for column at index idx. Accepts null values.
idx | The column index |
bytes | A ByteBuffer with bytes between position and limit that are a string encoded according to Vertica's requirements. This buffer must fit within the column's length requirements. |
IllegalArgumentException | if bytes is too long |
|
inherited |
Set a String value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set a Timestamp value for column at index idx. Accepts null values.
idx | column number |
value | value to set it to |
|
inherited |
Set a value for a column using type coercion. Type coercion attempts to generate an appropriate value for the target column type based on the input type.
The following target column types are supported by the SDK for this method. All others will generate a TypeCoercionException due to FAIL_SDK_UNSUPPORTED_TYPE if appropriate.
idx | The column index |
value | The value to store in the column. May be null. |
coerce | The type coercion policy. |
Referenced by com.vertica.sdk.PartitionWriter.setRowFromMap().
|
inherited |
Encodes a VMap into the given column, which must be of binary type.
idx | The index of the binary or varbinary column. |
data | The data. Null data is treated as empty. |
|
inherited |
Encodes a VMap into the given column, which must be of binary type. Uses standard type coercion to identify aggregate values and to serialize all values.
idx | The index of the binary or varbinary column. |
data | The data. Null data is treated as empty. |
coerce | Ignored but still here for backwards compatibility. |