Java SDK Documentation  24.2.0
com.vertica.sdk.VerticaBlock Class Referenceabstract
Inheritance diagram for com.vertica.sdk.VerticaBlock:
Inheritance graph
Collaboration diagram for com.vertica.sdk.VerticaBlock:
Collaboration graph

Public Member Functions

 VerticaBlock (int _ncols, int _rowcount)
 
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 ()
 
void resetBuffers ()
 

Public Attributes

int count
 
int index
 
int ncols
 
int nrows
 
SizedColumnTypes typeMetaData
 

Protected Member Functions

void clear ()
 
ByteBuffer getInlineColBuffer (int idx)
 

Protected Attributes

ArrayList< ByteBuffer > coldataareas
 
ArrayList< ByteBuffer > cols
 
ArrayList< Integer > colstrides
 
ArrayList< Integer > currentPos
 

Detailed Description

Represents an in-memory block of tuples

Member Function Documentation

◆ addCol() [1/4]

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
int  colstride,
VerticaType  dt,
String  colName 
)

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
colstrideThe stride between data instances.
dtThe type of input.
colNameName 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 
)

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
colstrideThe stride between data instances.
dtThe type of input.

◆ addCol() [3/4]

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
ByteBuffer  da,
int  colstride,
VerticaType  dt 
)

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
daThe location to find out of band string data.
colstrideThe stride between data instances.
dtThe type of input.

◆ addCol() [4/4]

void com.vertica.sdk.VerticaBlock.addCol ( ByteBuffer  arg,
ByteBuffer  da,
int  colstride,
VerticaType  dt,
String  colName 
)

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
daThe location to find out of band string data.
colstrideThe stride between data instances.
dtThe type of input.
colNameName of the column

◆ getColDataAreaRef()

ByteBuffer com.vertica.sdk.VerticaBlock.getColDataAreaRef ( int  idx)

Get the ByteBuffer that stores out of line string data (Data Area) for the idx'th argument

Parameters
idxThe 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)

Example: ByteBuffer a = arg_reader.getColPtr(0);

Parameters
idxThe 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(), and com.vertica.sdk.PartitionWriter.setTimestampValue().

◆ getInlineColBuffer()

ByteBuffer com.vertica.sdk.VerticaBlock.getInlineColBuffer ( int  idx)
protected

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
idxThe column number to retrieve from the input row.
Returns
the ByteBuffer for the column

Referenced by com.vertica.sdk.PartitionWriter.setStringBytes(), and com.vertica.sdk.PartitionWriter.setStringValue().

◆ getNumCols()

int com.vertica.sdk.VerticaBlock.getNumCols ( )
Returns
the number of arguments held by this reader.

◆ getNumRows()

int com.vertica.sdk.VerticaBlock.getNumRows ( )
Returns
the number of rows held by this block.

◆ getTypeMetaData()

SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData ( )
Returns
information about the types and numbers of arguments

Referenced by com.vertica.sdk.ParamReader.getType(), com.vertica.sdk.PartitionWriter.setRowFromMap(), and com.vertica.sdk.PartitionWriter.setValue().