com.vertica.sdk.PartitionReader Class Reference

Inheritance diagram for com.vertica.sdk.PartitionReader:

Collaboration diagram for com.vertica.sdk.PartitionReader:

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)
ByteBuffer getColDataAreaRef (int idx)
ByteBuffer getColRef (int idx)
java.sql.Date getDate (int idx)
double getDouble (int idx)
long getLong (int idx)
int getNumCols ()
int getNumRows ()
BaseDataOID getProcessBlockUserInfoVectorAt (int i)
String getString (int idx)
int getStringLength (int idx)
int getStringLoc (int idx)
java.sql.Timestamp getTimestamp (int idx)
SizedColumnTypes getTypeMetaData ()
VNumeric getVNumeric (int idx)
VString getVString (int idx)
boolean isBooleanNull (int idx)
boolean isDateNull (int idx)
boolean isDoubleNull (int idx)
boolean isLongNull (int idx)
boolean isStringNull (int idx)
boolean isTimestampInfinite (int idx)
boolean isTimestampInfiniteNeg (int idx)
boolean isTimestampInfinitePos (int idx)
boolean isTimestampNull (int idx)
boolean next () throws UdfException, DestroyInvocation
abstract boolean readNextBlock () throws UdfException, DestroyInvocation
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 coldataareas
ArrayList cols
ArrayList colstrides
ArrayList currentPos

Detailed Description

PartitionReader provides an iterator-based read interface over all input data in a single partition. Automatically fetches data a block-at-a-time, as needed.

Member Function Documentation

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().

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.
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.
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
boolean com.vertica.sdk.BlockReader.getBoolean(int idx)

inherited Get a BOOLEAN value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns The value of the idx'th argument, cast as a BOOLEAN.

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().

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

java.sql.Date com.vertica.sdk.BlockReader.getDate(int idx)

inherited Get a DATE value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns The value of the idx'th argument, cast as a DATE; null if the column is NULL.

double com.vertica.sdk.BlockReader.getDouble(int idx)

inherited Get a DOUBLE value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns The value of the idx'th argument, cast as a DOUBLE.

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

long com.vertica.sdk.BlockReader.getLong(int idx)

inherited Get a LONG INTEGER value from the input row.

Example

long a = arg_reader.getLong(0);

Parameters

  • idx: The column number to retrieve from the input row.

Returns The value of the idx'th argument, cast as a LONG INTEGER.

Referenced by

int com.vertica.sdk.VerticaBlock.getNumCols()

inherited Returns the number of arguments held by this reader.

int com.vertica.sdk.VerticaBlock.getNumRows()

inherited Returns the number of rows held by this block.

String com.vertica.sdk.BlockReader.getString(int idx)

inherited Get a reference to an VARCHAR/CHAR/VARBINARY/BINARY value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns a reference to the idx'th argument, cast as an String.

int com.vertica.sdk.BlockReader.getStringLength(int idx)

inherited Get length of the String from the input row

Parameters

  • idx: The column number to retrieve from the input row.

Returns The length of the String in specified column.

Referenced by

int com.vertica.sdk.BlockReader.getStringLoc(int idx)

inherited Get 'location' of the String from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns The location of the String in specified column. If zero, data is inlined immediately after the header, otherwise data is at offset loc within the data area.

Referenced by com.vertica.sdk.BlockReader.getVString().

java.sql.Timestamp com.vertica.sdk.BlockReader.getTimestamp(int idx)

inherited Get a TIMESTAMP value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns The value of the idx'th argument, cast as a TIMESTAMP; null if the column is NULL or represents 'infinity'.

SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()

inherited Returns information about the types and numbers of arguments

Referenced by

VNumeric com.vertica.sdk.BlockReader.getVNumeric(int idx)

inherited Get a reference to a VNumeric value from the input row.

Parameters

  • idx: The column number to retrieve from the input row.

Returns A reference to the retrieved value cast as a Numeric.

VString com.vertica.sdk.BlockReader.getVString(int idx)

inherited Get a reference from the input row to an VString value, which represents a SQL VARCHAR/CHAR/VARBINARY/BINARY value.

Parameters

  • idx: The column number to retrieve from the input row.

Returns a reference to the idx'th argument, cast as an VString.

Referenced by com.vertica.sdk.BlockReader.getString().

boolean com.vertica.sdk.BlockReader.isBooleanNull(int idx)

inherited Check whether a value from the input row is NULL in BOOLEAN type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

boolean com.vertica.sdk.BlockReader.isDateNull(int idx)

inherited Check whether a value from the input row is NULL in DATE type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

Referenced by com.vertica.sdk.BlockReader.getDate().

boolean com.vertica.sdk.BlockReader.isDoubleNull(int idx)

inherited Check whether a value from the input row is NULL in DOUBLE type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

boolean com.vertica.sdk.BlockReader.isLongNull(int idx)

inherited Check whether a value from the input row is NULL in LONG INTERGER type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

Referenced by

boolean com.vertica.sdk.BlockReader.isStringNull(int idx)

inherited Check whether a value from the input row is NULL in SQL VARCHAR/CHAR/VARBINARY/BINARY type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

Referenced by com.vertica.sdk.BlockReader.getString().

boolean com.vertica.sdk.BlockReader.isTimestampInfinite(int idx)

inherited Check whether a TIMESTAMP value from the input row represents 'infinity'.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the TIMESTAMP value is '+infinity' or '-infinity', false otherwise.

Referenced by com.vertica.sdk.BlockReader.getTimestamp().

boolean com.vertica.sdk.BlockReader.isTimestampInfiniteNeg(int idx)

inherited Check whether a TIMESTAMP value from the input row represents '-infinity'.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the TIMESTAMP value is '-infinity', false otherwise.

Referenced by com.vertica.sdk.BlockReader.isTimestampInfinite().

boolean com.vertica.sdk.BlockReader.isTimestampInfinitePos(int idx)

inherited Check whether a TIMESTAMP value from the input row represents '+infinity'.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the TIMESTAMP value is '+infinity', false otherwise.

Referenced by com.vertica.sdk.BlockReader.isTimestampInfinite().

boolean com.vertica.sdk.BlockReader.isTimestampNull(int idx)

inherited Check whether a value from the input row is NULL in TIMESTAMP type.

Parameters

  • idx: The column number to retrieve from the input row.

Returns true if the value is NULL, false otherwise.

Referenced by com.vertica.sdk.BlockReader.getTimestamp().

abstract boolean com.vertica.sdk.PartitionReader.readNextBlock() throws UdfException, DestroyInvocation

pure virtual Reads in the next block of data and positions cursor at the beginning.

Returns false if there's no more input data

Exceptions

  • UdfException: UDF problem
  • DestroyInvocation: Invocation needed to be destroyed

Implemented in com.vertica.sdk.AnalyticPartitionReader.