com.vertica.sdk.SizedColumnTypes Class Reference

Represents types and information to determine the size of the columns as input/output of a User Defined Function/Transform. More...

List of all members.

Public Member Functions

void addBinary (int len)
void addBinary (int len, String fieldName)
 Adds a column of type BINARY.
void addBool ()
void addBool (String fieldName)
 Adds a column of type BOOLEAN.
void addChar (int len)
void addChar (int len, String fieldName)
 Adds a column of type CHAR.
void addDate ()
void addDate (String fieldName)
 Adds a column of type DATE.
void addFloat ()
void addFloat (String fieldName)
 Adds a column of type FLOAT.
void addInt ()
void addInt (String fieldName)
 Adds a column of type INTEGER.
void addLongVarbinary (int len)
void addLongVarbinary (int len, String fieldName)
 Adds a column of type LONGVARBINARY.
void addLongVarchar (int len)
void addLongVarchar (int len, String fieldName)
 Adds a column of type LONGVARCHAR.
void addNumeric (int precision, int scale)
void addNumeric (int precision, int scale, String fieldName)
 Adds a column of type NUMERIC.
void addTime (int precision)
void addTime (int precision, String fieldName)
 Adds a column of type TIME.
void addTimestamp ()
void addTimestamp (String fieldName)
 Adds a column of type TIMESTAMP.
void addTimeTz (int precision)
void addTimeTz (int precision, String fieldName)
 Adds a column of type TIME WITH TIMEZONE.
void addVarbinary (int len)
void addVarbinary (int len, String fieldName)
 Adds a column of type VARBINARY.
void addVarchar (int len)
void addVarchar (int len, String fieldName)
 Adds a column of type VARCHAR.
void getArgumentColumns (ArrayList< Integer > cols)
 Retrieves indexes of argument columns. Indexes in cols can be used in conjunction with other functions, e.g. getColumnType(size_t) and getColumnName(size_t).
int getColumnCount ()
 Returns the number of columns.
String getColumnName (int idx)
 Returns the name of the column at the specified index.
VerticaType getColumnType (int idx)
 Returns the type of the column at the specified index.
int getLastOrderColumnIdx ()
 Gets the last ORDER BY column index.
int getLastPartitionColumnIdx ()
 Gets the last PARTITION BY column index.
boolean isOrderByColumn (int idx)
 Indicates whether the column at the specified index is an ORDER BY column.
boolean isPartitionByColumn (int idx)
 Indicates whether the column at the specified index is a PARTITION BY column.
void setPartitionOrderColumnIdx (SizedColumnTypes other)
 Sets the PARTITION BY and ORDER BY column indexes from another SizedColumnTypes object.
void setPartitionOrderColumnIdx (int partition_idx, int order_idx)
 Sets the PARTITION BY and ORDER BY column indexes.

Classes

class  Field
class  PartitionOrderColumnInfo
 Represents the partition by and order by column information for each phase in a multi-phase transform function. More...


Detailed Description

Represents types and information to determine the size of the columns as input/output of a User Defined Function/Transform.

This class is used to exchange size and precision information between Vertica and the user defined function/transform function. Vertica provides the user code with size/precision information about the particular data types that it has been called with, and expects the user code to provide size/precision information about what it will return.


Member Function Documentation

void com.vertica.sdk.SizedColumnTypes.addBinary ( int  len,
String  fieldName 
)

Adds a column of type BINARY.

Parameters:
len The length of the binary string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addBool ( String  fieldName  ) 

Adds a column of type BOOLEAN.

Parameters:
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addChar ( int  len,
String  fieldName 
)

Adds a column of type CHAR.

Parameters:
len The length of the string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addDate ( String  fieldName  ) 

Adds a column of type DATE.

Parameters:
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addFloat ( String  fieldName  ) 

Adds a column of type FLOAT.

Parameters:
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addInt ( String  fieldName  ) 

Adds a column of type INTEGER.

Parameters:
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addLongVarbinary ( int  len,
String  fieldName 
)

Adds a column of type LONGVARBINARY.

Parameters:
len The length of the binary string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addLongVarchar ( int  len,
String  fieldName 
)

Adds a column of type LONGVARCHAR.

Parameters:
len The length of the string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addNumeric ( int  precision,
int  scale,
String  fieldName 
)

Adds a column of type NUMERIC.

Parameters:
precision The precision for the numeric value.
scale The scale for the numeric value.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addTime ( int  precision,
String  fieldName 
)

Adds a column of type TIME.

Parameters:
precision The precision for the time.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addTimestamp ( String  fieldName  ) 

Adds a column of type TIMESTAMP.

Parameters:
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addTimeTz ( int  precision,
String  fieldName 
)

Adds a column of type TIME WITH TIMEZONE.

Parameters:
precision The precision for the time.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addVarbinary ( int  len,
String  fieldName 
)

Adds a column of type VARBINARY.

Parameters:
len The length of the binary string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.addVarchar ( int  len,
String  fieldName 
)

Adds a column of type VARCHAR.

Parameters:
len The length of the string.
fieldName The name for the output column.

void com.vertica.sdk.SizedColumnTypes.getArgumentColumns ( ArrayList< Integer >  cols  ) 

Retrieves indexes of argument columns. Indexes in cols can be used in conjunction with other functions, e.g. getColumnType(size_t) and getColumnName(size_t).

Parameters:
cols A vector to store the retrieved column indexes.

String com.vertica.sdk.SizedColumnTypes.getColumnName ( int  idx  ) 

Returns the name of the column at the specified index.

Parameters:
idx The index of the column

VerticaType com.vertica.sdk.SizedColumnTypes.getColumnType ( int  idx  ) 

Returns the type of the column at the specified index.

Parameters:
idx The index of the column
Returns:
a VerticaType object describing the column's data type.

boolean com.vertica.sdk.SizedColumnTypes.isOrderByColumn ( int  idx  ) 

Indicates whether the column at the specified index is an ORDER BY column.

Parameters:
idx The index of the column

boolean com.vertica.sdk.SizedColumnTypes.isPartitionByColumn ( int  idx  ) 

Indicates whether the column at the specified index is a PARTITION BY column.

Parameters:
idx The index of the column

void com.vertica.sdk.SizedColumnTypes.setPartitionOrderColumnIdx ( SizedColumnTypes  other  ) 

Sets the PARTITION BY and ORDER BY column indexes from another SizedColumnTypes object.

Parameters:
other The SizedColumnTypes object to set the indexes from

void com.vertica.sdk.SizedColumnTypes.setPartitionOrderColumnIdx ( int  partition_idx,
int  order_idx 
)

Sets the PARTITION BY and ORDER BY column indexes.

Parameters:
partition_idx Index of the last partition-by column
order_idx Index of the last order-by column