This is the multi-page printable view of this section.
Click here to print .
Return to the regular view of this page .
Class Index
A | B | C | D | E | F | I | K | M | N | P | R | S | T | U | V
A
B
C
D
E
F
I
K
M
N
P
R
S
T
U
V
1 - Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 1234567]
▼Ncom
▼Nvertica
▼Nsdk
▼Nvmap
▼Nv1
▼CEncoder
CMatchingKeySelector
CKeySelector
CInvalidMapKeyException
CVMapEncodingException
CAnalyticFunction
CAnalyticFunctionFactory
CAnalyticPartitionReader
CAnalyticPartitionWriter
CBaseDataOID
CBasics
CBlockReader
CBlockWriter
CBuildInfo
CColumnTypes
CContinuousReader
CContinuousRejecter
▼CContinuousUDParser
CCoroutineState
CDataBuffer
CDefaultSourceIterator
CDestroyInvocation
CDFSConstants
▼CDFSFile
CDFSDistribution
CDFSRootParentType
CDFSScope
CDFSFileReader
CDFSFileStatus
CDFSFileWriter
CExecutorParamWriter
CExecutorPlanContext
CFileManager
CFilterFactory
CIdentComparator
CIterativeSourceFactory
CMultiPhaseTransformFunctionFactory
CNodeSpecifyingPlanContext
CNoopTypeCoercion
CNullTypeCoercion
CParamReader
CParamWriter
CParserFactory
CPartitionReader
CPartitionWriter
CPerColumnParamReader
CPGUDxShared
CPlanContext
CPortion
CRejectedRecord
▼CScalarFunction
CInterfaceType
▼CScalarFunctionFactory
Cstrictness
Cvolatility
CServerInterface
CSessionParamReaderMap
CSessionParamWriterMap
CSizedColumnTypes
CSourceFactory
CSourceIterator
▼CStandardTypeCoercion
CBooleanEvaluation
CSpecialBigDecimal
▼CState
CInputState
CStreamState
CStreamWriter
CStringUtils
▼CTimestampUDxShared
CDTtype
CTransformFunction
CTransformFunctionFactory
CTransformFunctionPhase
Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function
▼CTypeCoercion
CMetaType
CTypeCoercionException
CTypeCoercionPolicy
CUdfException
CUDFilter
CUDLFactory
CUDParser
CUDSource
▼CUDXFactory
CUDXType
CUDXFunction
CUDXLibrary
CUDXObject
CUnsizedUDSource
CVerticaBlock
CVerticaType
CVNumeric
CVResources
CVString
2 - Class Hierarchy
Go to the graphical class hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12345]
Ccom.vertica.sdk.BaseDataOID
Ccom.vertica.sdk.Basics
Ccom.vertica.sdk.BuildInfo
Ccom.vertica.sdk.ColumnTypes
Ccom.vertica.sdk.ContinuousReader
Ccom.vertica.sdk.ContinuousRejecter
Ccom.vertica.sdk.ContinuousUDParser.CoroutineState
Ccom.vertica.sdk.DataBuffer
Ccom.vertica.sdk.DFSConstants
Ccom.vertica.sdk.DFSFile
Ccom.vertica.sdk.DFSFile.DFSDistribution
Ccom.vertica.sdk.DFSFile.DFSRootParentType
Ccom.vertica.sdk.DFSFile.DFSScope
Ccom.vertica.sdk.DFSFileReader
Ccom.vertica.sdk.DFSFileStatus
Ccom.vertica.sdk.DFSFileWriter
Ccom.vertica.sdk.FileManager
Ccom.vertica.sdk.PerColumnParamReader
Ccom.vertica.sdk.PGUDxShared
▼Ccom.vertica.sdk.PlanContext
▼Ccom.vertica.sdk.NodeSpecifyingPlanContext
Ccom.vertica.sdk.ExecutorPlanContext
Ccom.vertica.sdk.Portion
Ccom.vertica.sdk.RejectedRecord
Ccom.vertica.sdk.ScalarFunction.InterfaceType
Ccom.vertica.sdk.ScalarFunctionFactory.strictness
Ccom.vertica.sdk.ScalarFunctionFactory.volatility
Ccom.vertica.sdk.ServerInterface
Ccom.vertica.sdk.SessionParamReaderMap
Ccom.vertica.sdk.SessionParamWriterMap
Ccom.vertica.sdk.SizedColumnTypes
Ccom.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
Ccom.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
Ccom.vertica.sdk.State
Ccom.vertica.sdk.State.InputState
Ccom.vertica.sdk.State.StreamState
Ccom.vertica.sdk.StringUtils
Ccom.vertica.sdk.TimestampUDxShared
Ccom.vertica.sdk.TimestampUDxShared.DTtype
Ccom.vertica.sdk.TransformFunctionPhase
Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function
▼Ccom.vertica.sdk.TypeCoercion
▼Ccom.vertica.sdk.NullTypeCoercion
▼Ccom.vertica.sdk.NoopTypeCoercion
Ccom.vertica.sdk.StandardTypeCoercion
Ccom.vertica.sdk.TypeCoercion.MetaType
Ccom.vertica.sdk.TypeCoercionPolicy
▼Ccom.vertica.sdk.UDXFactory
Ccom.vertica.sdk.AnalyticFunctionFactory
Ccom.vertica.sdk.MultiPhaseTransformFunctionFactory
Ccom.vertica.sdk.ScalarFunctionFactory
Ccom.vertica.sdk.TransformFunctionFactory
▼Ccom.vertica.sdk.UDLFactory
Ccom.vertica.sdk.FilterFactory
▼Ccom.vertica.sdk.IterativeSourceFactory
Ccom.vertica.sdk.SourceFactory
Ccom.vertica.sdk.ParserFactory
Ccom.vertica.sdk.UDXFactory.UDXType
Ccom.vertica.sdk.UDXLibrary
▼Ccom.vertica.sdk.UDXObject
▼Ccom.vertica.sdk.SourceIterator
Ccom.vertica.sdk.DefaultSourceIterator
Ccom.vertica.sdk.UDFilter
▼Ccom.vertica.sdk.UDParser
Ccom.vertica.sdk.ContinuousUDParser
▼Ccom.vertica.sdk.UDXFunction
Ccom.vertica.sdk.AnalyticFunction
Ccom.vertica.sdk.ScalarFunction
Ccom.vertica.sdk.TransformFunction
▼Ccom.vertica.sdk.UnsizedUDSource
Ccom.vertica.sdk.UDSource
▼Ccom.vertica.sdk.VerticaBlock
▼Ccom.vertica.sdk.BlockReader
▼Ccom.vertica.sdk.ParamReader
▼Ccom.vertica.sdk.ParamWriter
Ccom.vertica.sdk.ExecutorParamWriter
▼Ccom.vertica.sdk.PartitionReader
Ccom.vertica.sdk.AnalyticPartitionReader
Ccom.vertica.sdk.BlockWriter
▼Ccom.vertica.sdk.PartitionWriter
Ccom.vertica.sdk.AnalyticPartitionWriter
Ccom.vertica.sdk.StreamWriter
Ccom.vertica.sdk.VerticaType
▼Ccom.vertica.sdk.vmap.v1.KeySelector
Ccom.vertica.sdk.vmap.v1.Encoder
Ccom.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector
Ccom.vertica.sdk.VNumeric
Ccom.vertica.sdk.VResources
Ccom.vertica.sdk.VString
▼CRuntimeException
Ccom.vertica.sdk.UdfException
▼CThrowable
Ccom.vertica.sdk.DestroyInvocation
▼CIllegalArgumentException
Ccom.vertica.sdk.TypeCoercionException
▼Ccom.vertica.sdk.vmap.VMapEncodingException
Ccom.vertica.sdk.vmap.InvalidMapKeyException
▼CComparator
Ccom.vertica.sdk.IdentComparator
3 - Graphical Class Hierarchy
Class Hierarchy
Go to the textual class hierarchy
4 - Class Members: A
Here is a list of all documented class members with links to the class documentation for each member:
- a -
addAny()
: com.vertica.sdk.ColumnTypes
addBinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addBinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addBinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addBool()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addBoolOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addBoolPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addChar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addCharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addCharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addCol()
: com.vertica.sdk.VerticaBlock
addDate()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addDateOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addDatePartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addFloat()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addFloatOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addFloatPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addInt()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addInterval()
: com.vertica.sdk.ColumnTypes
addIntervalOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalYM()
: com.vertica.sdk.ColumnTypes
addIntervalYMOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalYMPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addIntOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarbinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addLongVarbinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarbinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarchar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addLongVarcharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarcharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addNumeric()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addNumericOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addNumericPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTime()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimeOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimePartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestamp()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimestampOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampTz()
: com.vertica.sdk.ColumnTypes
addTimestampTzOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampTzPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimeTz()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimeTzOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addUDSessionParamReader()
: com.vertica.sdk.SessionParamReaderMap
addUDSessionParamWriter()
: com.vertica.sdk.SessionParamWriterMap
addVarbinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addVarbinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addVarbinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addVarchar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addVarcharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addVarcharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
asBinaryBytes()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
asBoolean()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asBooleanByJava()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByNumeric()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByPerl()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByPython()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByVertica()
: com.vertica.sdk.StandardTypeCoercion
asCharBytes()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asDate()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asDouble()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asLong()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asTimestamp()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
5 - Class Member Functions: A
- a -
addAny()
: com.vertica.sdk.ColumnTypes
addBinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addBinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addBinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addBool()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addBoolOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addBoolPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addChar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addCharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addCharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addCol()
: com.vertica.sdk.VerticaBlock
addDate()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addDateOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addDatePartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addFloat()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addFloatOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addFloatPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addInt()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addInterval()
: com.vertica.sdk.ColumnTypes
addIntervalOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalYM()
: com.vertica.sdk.ColumnTypes
addIntervalYMOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntervalYMPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addIntOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addIntPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarbinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addLongVarbinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarbinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarchar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addLongVarcharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addLongVarcharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addNumeric()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addNumericOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addNumericPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTime()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimeOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimePartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestamp()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimestampOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampTz()
: com.vertica.sdk.ColumnTypes
addTimestampTzOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addTimestampTzPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addTimeTz()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addTimeTzOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addUDSessionParamReader()
: com.vertica.sdk.SessionParamReaderMap
addUDSessionParamWriter()
: com.vertica.sdk.SessionParamWriterMap
addVarbinary()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addVarbinaryOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addVarbinaryPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
addVarchar()
: com.vertica.sdk.ColumnTypes
, com.vertica.sdk.SizedColumnTypes
addVarcharOrderColumn()
: com.vertica.sdk.SizedColumnTypes
addVarcharPartitionColumn()
: com.vertica.sdk.SizedColumnTypes
asBinaryBytes()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
asBoolean()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asBooleanByJava()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByNumeric()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByPerl()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByPython()
: com.vertica.sdk.StandardTypeCoercion
asBooleanByVertica()
: com.vertica.sdk.StandardTypeCoercion
asCharBytes()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asDate()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asDouble()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asLong()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
asTimestamp()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.StandardTypeCoercion
, com.vertica.sdk.TypeCoercion
6 - Class Member Variables
7 - com.vertica.sdk.AnalyticFunction Class Reference
Inheritance diagram for com.vertica.sdk.AnalyticFunction:
Collaboration diagram for com.vertica.sdk.AnalyticFunction:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
boolean
isCanceled ()
abstract void
processPartition (ServerInterface srvInterface, AnalyticPartitionReader input_reader, AnalyticPartitionWriter output_writer) throws UdfException, DestroyInvocation
void
setup (ServerInterface srvInterface, SizedColumnTypes argTypes)
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Interface for User-Defined Analytic Function (UDAnF). A UDAnF operates on rows of data and returns rows of data, not necessarily 1:1.
An AnalyticFunction must have an associated AnalyticFunctionFactory .
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy() [1/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance destruction. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
Referenced by com.vertica.sdk.UDXFunction.destroy() .
◆ destroy() [2/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
inherited
Perform per instance destruction and write session parameters to be used by UDxs that are invoked after this one returns. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
udSessionParams: a SessionParamWriterMap
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ processPartition()
abstract void com.vertica.sdk.AnalyticFunction.processPartition(ServerInterface srvInterface, AnalyticPartitionReader input_reader, AnalyticPartitionWriter output_writer) throws UdfException, DestroyInvocation
abstract
Invoke a user defined analytic on a set of rows. As the name suggests, a batch of rows are passed in for every invocation to amortize performance.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
input_reader: input rows
output_writer: output location
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ setup()
void com.vertica.sdk.UDXFunction.setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance initialization. This function may throw errors.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
8 - com.vertica.sdk.AnalyticFunction Member List
This is the complete list of members for com.vertica.sdk.AnalyticFunction , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
com.vertica.sdk.UDXFunction
isCanceled()
com.vertica.sdk.UDXObject
processPartition(ServerInterface srvInterface, AnalyticPartitionReader input_reader, AnalyticPartitionWriter output_writer)
com.vertica.sdk.AnalyticFunction
setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
9 - com.vertica.sdk.AnalyticFunctionFactory Class Reference
Inheritance diagram for com.vertica.sdk.AnalyticFunctionFactory:
Collaboration diagram for com.vertica.sdk.AnalyticFunctionFactory:
Public Member Functions
abstract AnalyticFunction
createAnalyticFunction (ServerInterface srvInterface)
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
abstract void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstract void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
UDXType
getUDXFactoryType ()
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Interface for declaring parameters and return types for, and instantiating, an associated AnalyticFunction .
Member Function Documentation
◆ createAnalyticFunction()
abstract AnalyticFunction com.vertica.sdk.AnalyticFunctionFactory.createAnalyticFunction(ServerInterface srvInterface)
abstract
Called when Vertica needs a new AnalyticFunction object to process a function call.
Note
More than one object may be instantiated per query.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
an AnalyticFunction object which implements the UDx API described by this metadata.
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources() [1/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources() .
◆ getPerInstanceResources() [2/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
abstract void com.vertica.sdk.UDXFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstractinherited
Provides the argument and return types of the UDX
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments
returnType: the type(s) of the return
Referenced by com.vertica.sdk.ScalarFunctionFactory.getReturnType() .
◆ getReturnType()
abstract void com.vertica.sdk.UDXFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
abstractinherited
Function to tell Vertica what the return types (and length/precision if necessary) of this UDX are.
For CHAR/VARCHAR types, specify the max length,
For NUMERIC types, specify the precision and scale.
For Time types (with or without time zone), specify the precision, -1 means unspecified/don't care
For IntervalYM/IntervalDS types, specify the precision and range
For all other types, no length/precision specification needed
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: Provides the data types of arguments that this UDT was called with. This may be used to modify the return types accordingly.
returnType: User code must fill in the names and data types returned by the UDT.
◆ getUDXFactoryType()
UDXType com.vertica.sdk.AnalyticFunctionFactory.getUDXFactoryType()
Returns
the object type internally used by Vertica
10 - com.vertica.sdk.AnalyticFunctionFactory Member List
This is the complete list of members for com.vertica.sdk.AnalyticFunctionFactory , including all inherited members.
createAnalyticFunction(ServerInterface srvInterface)
com.vertica.sdk.AnalyticFunctionFactory
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDXFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDXFactory
getUDXFactoryType()
com.vertica.sdk.AnalyticFunctionFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
11 - com.vertica.sdk.AnalyticPartitionReader Class Reference
Inheritance diagram for com.vertica.sdk.AnalyticPartitionReader:
Collaboration diagram for com.vertica.sdk.AnalyticPartitionReader:
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
isNewOrderByKey ()
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 ()
abstract void
setupColsAndStrides ()
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
ArrayList< Boolean >
newOrderMarkers
Detailed Description
Provides an iterator-based read interface over all the partition_by keys, order_by keys, and function arguments in a partition.
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
◆ getBoolean()
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.
◆ 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
◆ getDate()
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.
◆ getDouble()
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.
◆ 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
◆ getLong()
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
◆ 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.
◆ getString()
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.
◆ getStringLength()
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
◆ getStringLoc()
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() .
◆ getTimestamp()
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
◆ getVNumeric()
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.
◆ getVString()
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() .
◆ isBooleanNull()
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.
◆ isDateNull()
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() .
◆ isDoubleNull()
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.
◆ isLongNull()
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
◆ isStringNull()
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() .
◆ isTimestampInfinite()
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() .
◆ isTimestampInfiniteNeg()
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() .
◆ isTimestampInfinitePos()
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() .
◆ isTimestampNull()
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() .
◆ readNextBlock()
abstract boolean com.vertica.sdk.AnalyticPartitionReader.readNextBlock() throws UdfException, DestroyInvocation
abstract
Reads in the next block of data and positions cursor at the beginning.
Returns
false if there's no more input data
12 - com.vertica.sdk.AnalyticPartitionReader Member List
This is the complete list of members for com.vertica.sdk.AnalyticPartitionReader , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
AnalyticPartitionReader() (defined in com.vertica.sdk.AnalyticPartitionReader)
com.vertica.sdk.AnalyticPartitionReader
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(int idx)
com.vertica.sdk.BlockReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(int idx)
com.vertica.sdk.BlockReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isLongNull(int idx)
com.vertica.sdk.BlockReader
isNewOrderByKey() (defined in com.vertica.sdk.AnalyticPartitionReader)
com.vertica.sdk.AnalyticPartitionReader
isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
newOrderMarkers (defined in com.vertica.sdk.AnalyticPartitionReader)
com.vertica.sdk.AnalyticPartitionReader
protected
next() (defined in com.vertica.sdk.PartitionReader)
com.vertica.sdk.PartitionReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
PartitionReader() (defined in com.vertica.sdk.PartitionReader)
com.vertica.sdk.PartitionReader
readNextBlock()
com.vertica.sdk.AnalyticPartitionReader
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setupColsAndStrides() (defined in com.vertica.sdk.AnalyticPartitionReader)
com.vertica.sdk.AnalyticPartitionReader
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
13 - com.vertica.sdk.AnalyticPartitionWriter Class Reference
Inheritance diagram for com.vertica.sdk.AnalyticPartitionWriter:
Collaboration diagram for com.vertica.sdk.AnalyticPartitionWriter:
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
Detailed Description
Partition writer for all input data in a single partition. It automatically makes space as needed.
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
void com.vertica.sdk.PartitionWriter.copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx) throws UdfException
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.
Parameters
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)
◆ 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
◆ getDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.getDefaultTypeCoercion()
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 .
See also
#setRowFromMap(Map)
Returns
the current default TypeCoercion , creating one if necessary.
Referenced by
◆ 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.
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ setBooleanValue()
void com.vertica.sdk.PartitionWriter.setBooleanValue(int idx, Boolean value)
inherited
Set a Boolean value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDateValue()
void com.vertica.sdk.PartitionWriter.setDateValue(int idx, java.sql.Date value)
inherited
Set a Date value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.setDefaultTypeCoercion(TypeCoercion coerce)
inherited
Set the default type coercion instance.
See also
#setRowFromMap(Map)
Parameters
coerce: A TypeCoercion instance.
Returns
the former default, which may be null.
◆ setDoubleValue()
void com.vertica.sdk.PartitionWriter.setDoubleValue(int idx, Double value)
inherited
Set a Double value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setLongValue()
void com.vertica.sdk.PartitionWriter.setLongValue(int idx, Long value)
inherited
Set a Long value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setNumericValue()
void com.vertica.sdk.PartitionWriter.setNumericValue(int idx, BigDecimal value)
inherited
Set a Numeric value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setRowFromMap() [1/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData)
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.
Parameters
rowData: The data. Null data is treated as empty.
See also
#setRowFromMap(Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setRowFromMap() [2/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
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).
Parameters
rowData: The data. Null data is treated as empty.
coerce: The implementation of coercion
See also
#setVMap(int, Map, TypeCoercion)
setValue(int, Object, TypeCoercion)
◆ setStringBytes()
void com.vertica.sdk.PartitionWriter.setStringBytes(int idx, ByteBuffer bytes)
inherited
Set a String value for column at index idx. Accepts null values.
Parameters
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.
Exceptions
IllegalArgumentException: if bytes is too long
◆ setStringValue()
void com.vertica.sdk.PartitionWriter.setStringValue(int idx, String value)
inherited
Set a String value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setTimestampValue()
void com.vertica.sdk.PartitionWriter.setTimestampValue(int idx, java.sql.Timestamp value)
inherited
Set a Timestamp value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setValue()
void com.vertica.sdk.PartitionWriter.setValue(int idx, Object value, TypeCoercion coerce)
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.
Bools
Integers (excluding Numeric)
Floats
String-like types (char and binary, along with var- and long variants)
Timestamp and timestamptz
Dates
Parameters
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() .
◆ setVMap() [1/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data)
inherited
Encodes a VMap into the given column, which must be of binary type.
Parameters
idx: The index of the binary or varbinary column.
data: The data. Null data is treated as empty.
See also
#setVMap(int, Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setVMap() [2/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
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.
Parameters
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.
See also
#setVMap(int, Map)
getDefaultTypeCoercion()
14 - com.vertica.sdk.AnalyticPartitionWriter Member List
This is the complete list of members for com.vertica.sdk.AnalyticPartitionWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
AnalyticPartitionWriter(int nargs) (defined in com.vertica.sdk.AnalyticPartitionWriter)
com.vertica.sdk.AnalyticPartitionWriter
blockSizeGivenRowSize(long row_size) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protectedstatic
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx)
com.vertica.sdk.PartitionWriter
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDefaultTypeCoercion()
com.vertica.sdk.PartitionWriter
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getNumCols()
com.vertica.sdk.VerticaBlock
getNumericWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getRowSize(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
getStringWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getWriteableBlock() (defined in com.vertica.sdk.AnalyticPartitionWriter)
com.vertica.sdk.AnalyticPartitionWriter
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next() (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
PartitionWriter(int nargs) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBoolean(int idx, boolean r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanValue(int idx, Boolean value)
com.vertica.sdk.PartitionWriter
setDate(int idx, java.sql.Date r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateValue(int idx, java.sql.Date value)
com.vertica.sdk.PartitionWriter
setDefaultTypeCoercion(TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setDouble(int idx, double r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleValue(int idx, Double value)
com.vertica.sdk.PartitionWriter
setLong(int idx, long r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongValue(int idx, Long value)
com.vertica.sdk.PartitionWriter
setNumeric(int idx, BigDecimal bd) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericValue(int idx, BigDecimal value)
com.vertica.sdk.PartitionWriter
setRowCount(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
setRowFromMap(Map< String,?> rowData)
com.vertica.sdk.PartitionWriter
setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setString(int idx, String r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringBytes(int idx, ByteBuffer bytes)
com.vertica.sdk.PartitionWriter
setStringNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringValue(int idx, String value)
com.vertica.sdk.PartitionWriter
setTimestamp(int idx, java.sql.Timestamp r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfiniteNeg(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfinitePos(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampValue(int idx, java.sql.Timestamp value)
com.vertica.sdk.PartitionWriter
setValue(int idx, Object value, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
throwInCorrectUsageError(int idx)
com.vertica.sdk.PartitionWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
15 - com.vertica.sdk.BaseDataOID Enum Reference
Collaboration diagram for com.vertica.sdk.BaseDataOID:
Public Member Functions
BaseDataOID (long oid)
long
getLong ()
Static Public Member Functions
static BaseDataOID
getBaseDataOID (long oid)
static String
getTypeStr (long oid)
Public Attributes
BinaryOID =(117)
BoolOID =(5)
CharOID =(8)
DateOID =(10)
Float8OID =(7)
Int8OID =(6)
IntervalOID =(14)
IntervalYMOID =(114)
LongVarbinaryOID =(116)
LongVarcharOID =(115)
NumericOID =(16)
RecordOID =(3)
RLETuple =(18)
TimeOID =(11)
TimestampOID =(12)
TimestampTzOID =(13)
TimeTzOID =(15)
UnknownOID =(4)
VarbinaryOID =(17)
VarcharOID =(9)
VPosOID =(2)
VTuple =(1)
VUnspecOID =(0)
16 - com.vertica.sdk.BaseDataOID Member List
This is the complete list of members for com.vertica.sdk.BaseDataOID , including all inherited members.
BaseDataOID(long oid) (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
BinaryOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
BoolOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
CharOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
DateOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
Float8OID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
getBaseDataOID(long oid) (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
static
getLong() (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
getTypeStr(long oid) (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
static
Int8OID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
IntervalOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
IntervalYMOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
LongVarbinaryOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
LongVarcharOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
NumericOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
RecordOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
RLETuple (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
TimeOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
TimestampOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
TimestampTzOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
TimeTzOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
UnknownOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
VarbinaryOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
VarcharOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
VPosOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
VTuple (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
VUnspecOID (defined in com.vertica.sdk.BaseDataOID)
com.vertica.sdk.BaseDataOID
17 - com.vertica.sdk.Basics Class Reference
Collaboration diagram for com.vertica.sdk.Basics:
Static Public Member Functions
static int
getNumericPrecision (int typmod)
Get Numeric precision from typmod.
static int
getNumericScale (int typmod)
Get Numeric scale from typmod.
static int
getNumericWordCount (int precision)
Get Numeric word count from precision.
static boolean
isSimilarNumericTypmod (int a, int b)
Return true if these have the same EE representation.
static long
JavaSQLDateToVerticaDate (java.sql.Date d)
static long
JavaSQLTimestampToVerticaTimestamp (java.sql.Timestamp ts)
static java.sql.Date
VerticaDateToJavaSQLDate (long num_days)
static java.sql.Timestamp
VerticaTimestampToJavaSQLTimestamp (long vts)
Static Public Attributes
static final int
DataAreaHeaderLen = 16
static final int
maxTimestampPricision = 6
static final int
StringValueHeaderLen = 8
static final int
StringValueLenOffset = 0
static final int
StringValueLocOffset = 4
static final long
TimestampInfiniteNeg = -0x7fffffffffffffffL
static final long
TimestampInfinitePos = 0x7fffffffffffffffL
static final byte
vbool_false = 0
static final byte
vbool_null = 2
static final byte
vbool_true = 1
static final long
vfloat_null_long_bits = 0x7ffffffffffffffeL
static final long
vint_null = 0x8000000000000000L
Member Function Documentation
◆ JavaSQLDateToVerticaDate()
static long com.vertica.sdk.Basics.JavaSQLDateToVerticaDate(java.sql.Date d)
static
Get the internal value that Vertica stores for the date type.
Parameters
d: A date value. Java stores Date objects as an offset from 1970-01-01 00:00:00 GMT. The day represented by d is the calendar date of d in GMT.
Returns
as a date type internally to vertica
Referenced by
◆ VerticaDateToJavaSQLDate()
static java.sql.Date com.vertica.sdk.Basics.VerticaDateToJavaSQLDate(long num_days)
static
Parameters
num_days: number of days since 2000-01-01
Returns
the Date
Referenced by com.vertica.sdk.BlockReader.getDate() .
◆ VerticaTimestampToJavaSQLTimestamp()
static java.sql.Timestamp com.vertica.sdk.Basics.VerticaTimestampToJavaSQLTimestamp(long vts)
static
Parameters
vts: number of microseconds since 2000-01-01 00:00:00 GMT
Returns
the Timestamp
Referenced by com.vertica.sdk.BlockReader.getTimestamp() .
18 - com.vertica.sdk.Basics Member List
This is the complete list of members for com.vertica.sdk.Basics , including all inherited members.
DataAreaHeaderLen (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
getNumericPrecision(int typmod)
com.vertica.sdk.Basics
static
getNumericScale(int typmod)
com.vertica.sdk.Basics
static
getNumericWordCount(int precision)
com.vertica.sdk.Basics
static
isSimilarNumericTypmod(int a, int b)
com.vertica.sdk.Basics
static
JavaSQLDateToVerticaDate(java.sql.Date d)
com.vertica.sdk.Basics
static
JavaSQLTimestampToVerticaTimestamp(java.sql.Timestamp ts) (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
maxTimestampPricision (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
StringValueHeaderLen (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
StringValueLenOffset (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
StringValueLocOffset (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
TimestampInfiniteNeg (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
TimestampInfinitePos (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
vbool_false (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
vbool_null (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
vbool_true (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
VerticaDateToJavaSQLDate(long num_days)
com.vertica.sdk.Basics
static
VerticaTimestampToJavaSQLTimestamp(long vts)
com.vertica.sdk.Basics
static
vfloat_null_long_bits (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
vint_null (defined in com.vertica.sdk.Basics)
com.vertica.sdk.Basics
static
19 - com.vertica.sdk.BlockReader Class Reference
Inheritance diagram for com.vertica.sdk.BlockReader:
Collaboration diagram for com.vertica.sdk.BlockReader:
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
void
resetBuffers ()
Public Attributes
int
count
int
index
int
ncols
int
nrows
SizedColumnTypes
typeMetaData
Protected Member Functions
BlockReader (int _ncols, int _rowcount)
void
clear ()
ByteBuffer
getInlineColBuffer (int idx)
Protected Attributes
ArrayList< ByteBuffer >
coldataareas
ArrayList< ByteBuffer >
cols
ArrayList< Integer >
colstrides
ArrayList< Integer >
currentPos
Detailed Description
Iterator interface for reading rows in a Vertica block.
This class provides the input to the ScalarFunction.processBlock() function. You extract values from the input row using data type specific functions to extract each column value. You can also determine the number of columns and their data types, if your processBlock function does not have hard-coded input expectations.
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
◆ getBoolean()
boolean com.vertica.sdk.BlockReader.getBoolean(int idx)
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.
◆ 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
◆ getDate()
java.sql.Date com.vertica.sdk.BlockReader.getDate(int idx)
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.
◆ getDouble()
double com.vertica.sdk.BlockReader.getDouble(int idx)
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.
◆ 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
◆ getLong()
long com.vertica.sdk.BlockReader.getLong(int idx)
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
◆ 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.
◆ getString()
String com.vertica.sdk.BlockReader.getString(int idx)
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.
◆ getStringLength()
int com.vertica.sdk.BlockReader.getStringLength(int idx)
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
◆ getStringLoc()
int com.vertica.sdk.BlockReader.getStringLoc(int idx)
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() .
◆ getTimestamp()
java.sql.Timestamp com.vertica.sdk.BlockReader.getTimestamp(int idx)
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
◆ getVNumeric()
VNumeric com.vertica.sdk.BlockReader.getVNumeric(int idx)
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.
◆ getVString()
VString com.vertica.sdk.BlockReader.getVString(int idx)
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() .
◆ isBooleanNull()
boolean com.vertica.sdk.BlockReader.isBooleanNull(int idx)
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.
◆ isDateNull()
boolean com.vertica.sdk.BlockReader.isDateNull(int idx)
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() .
◆ isDoubleNull()
boolean com.vertica.sdk.BlockReader.isDoubleNull(int idx)
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.
◆ isLongNull()
boolean com.vertica.sdk.BlockReader.isLongNull(int idx)
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
◆ isStringNull()
boolean com.vertica.sdk.BlockReader.isStringNull(int idx)
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() .
◆ isTimestampInfinite()
boolean com.vertica.sdk.BlockReader.isTimestampInfinite(int idx)
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() .
◆ isTimestampInfiniteNeg()
boolean com.vertica.sdk.BlockReader.isTimestampInfiniteNeg(int idx)
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() .
◆ isTimestampInfinitePos()
boolean com.vertica.sdk.BlockReader.isTimestampInfinitePos(int idx)
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() .
◆ isTimestampNull()
boolean com.vertica.sdk.BlockReader.isTimestampNull(int idx)
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() .
◆ next()
boolean com.vertica.sdk.BlockReader.next() throws UdfException, DestroyInvocation
Advance to the next record.
Returns
true if there are more rows to read, false otherwise.
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
20 - com.vertica.sdk.BlockReader Member List
This is the complete list of members for com.vertica.sdk.BlockReader , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(int idx)
com.vertica.sdk.BlockReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(int idx)
com.vertica.sdk.BlockReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isLongNull(int idx)
com.vertica.sdk.BlockReader
isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next()
com.vertica.sdk.BlockReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
21 - 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< ByteBuffer >
coldataareas
ArrayList< ByteBuffer >
cols
ArrayList< Integer >
colstrides
ArrayList< Integer >
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
◆ 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.
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ 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.
22 - com.vertica.sdk.BlockWriter Member List
This is the complete list of members for com.vertica.sdk.BlockWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockWriter(int rowcount, VerticaType returnType) (defined in com.vertica.sdk.BlockWriter)
com.vertica.sdk.BlockWriter
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVStringWriter()
com.vertica.sdk.BlockWriter
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next()
com.vertica.sdk.BlockWriter
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBoolean(boolean r)
com.vertica.sdk.BlockWriter
setBooleanNull()
com.vertica.sdk.BlockWriter
setDate(java.sql.Date r)
com.vertica.sdk.BlockWriter
setDateNull()
com.vertica.sdk.BlockWriter
setDouble(double r)
com.vertica.sdk.BlockWriter
setDoubleNull()
com.vertica.sdk.BlockWriter
setLong(long r)
com.vertica.sdk.BlockWriter
setLongNull()
com.vertica.sdk.BlockWriter
setNumeric(BigDecimal bd)
com.vertica.sdk.BlockWriter
setNumericNull() (defined in com.vertica.sdk.BlockWriter)
com.vertica.sdk.BlockWriter
setString(String r)
com.vertica.sdk.BlockWriter
setStringNull()
com.vertica.sdk.BlockWriter
setTimestamp(java.sql.Timestamp r)
com.vertica.sdk.BlockWriter
setTimestampInfiniteNeg()
com.vertica.sdk.BlockWriter
setTimestampInfinitePos()
com.vertica.sdk.BlockWriter
setTimestampNull()
com.vertica.sdk.BlockWriter
throwInCorrectUsageError()
com.vertica.sdk.BlockWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
23 - com.vertica.sdk.BuildInfo Class Reference
Collaboration diagram for com.vertica.sdk.BuildInfo:
Static Public Member Functions
static VerticaBuildInfo
get_vertica_build_info ()
static long
VERTICA_BUILD_ID_SDK_Version_as_int (int major, int minor, int sp, int hotfix)
static Boolean
VERTICA_BUILD_ID_SDK_Version_at_least (int major, int minor, int sp, int hotfix)
Static Public Attributes
static final String
VERTICA_BUILD_ID_Branch = "master"
static final String
VERTICA_BUILD_ID_Brand_Name = "Vertica Analytic Database"
static final String
VERTICA_BUILD_ID_Brand_Version = "v25.1.0"
static final String
VERTICA_BUILD_ID_Checksum = "b8809d9b667d1599d57ea9f73feecbca"
static final String
VERTICA_BUILD_ID_Codename = "Nibbler"
static final String
VERTICA_BUILD_ID_Date = "Fri Oct 4 04:49:28 2024"
static final String
VERTICA_BUILD_ID_Machine = "re-docker7-server"
static final String
VERTICA_BUILD_ID_Revision = "a741b15f902dfc3b1e6a52b8929be3f7dd0ab5a6"
static final String
VERTICA_BUILD_ID_SDK_Version = "24.2.0"
static final int
VERTICA_BUILD_ID_SDK_Version_Hotfix = 0
static final long
VERTICA_BUILD_ID_SDK_Version_Int = VERTICA_BUILD_ID_SDK_Version_as_int(VERTICA_BUILD_ID_SDK_Version_Major, VERTICA_BUILD_ID_SDK_Version_Minor, VERTICA_BUILD_ID_SDK_Version_SP, VERTICA_BUILD_ID_SDK_Version_Hotfix)
static final int
VERTICA_BUILD_ID_SDK_Version_Major = 24
static final int
VERTICA_BUILD_ID_SDK_Version_Minor = 2
static final int
VERTICA_BUILD_ID_SDK_Version_SP = 0
24 - com.vertica.sdk.BuildInfo Member List
This is the complete list of members for com.vertica.sdk.BuildInfo , including all inherited members.
get_vertica_build_info() (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Branch (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Brand_Name (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Brand_Version (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Checksum (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Codename (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Date (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Machine (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_Revision (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_as_int(int major, int minor, int sp, int hotfix) (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_at_least(int major, int minor, int sp, int hotfix) (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_Hotfix (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_Int (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_Major (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_Minor (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
VERTICA_BUILD_ID_SDK_Version_SP (defined in com.vertica.sdk.BuildInfo)
com.vertica.sdk.BuildInfo
static
25 - com.vertica.sdk.ColumnTypes Class Reference
Collaboration diagram for com.vertica.sdk.ColumnTypes:
Public Member Functions
void
addAny ()
Indicates that function can take any number and type of arguments.
void
addBinary ()
Adds a column of type BINARY.
void
addBool ()
Adds a column of type BOOLEAN.
void
addChar ()
Adds a column of type CHAR.
void
addDate ()
Adds a column of type DATE.
void
addFloat ()
Adds a column of type FLOAT.
void
addInt ()
Adds a column of type INTEGER.
void
addInterval ()
Adds a column of type INTERVAL/INTERVAL DAY TO SECOND.
void
addIntervalYM ()
Adds a column of type INTERVAL YEAR TO MONTH.
void
addLongVarbinary ()
Adds a column of type LONGVARBINARY.
void
addLongVarchar ()
Adds a column of type LONGVARCHAR.
void
addNumeric ()
Adds a column of type NUMERIC.
void
addTime ()
Adds a column of type TIME.
void
addTimestamp ()
Adds a column of type TIMESTAMP.
void
addTimestampTz ()
Adds a column of type TIMESTAMP WITH TIMEZONE.
void
addTimeTz ()
Adds a column of type TIME WITH TIMEZONE.
void
addVarbinary ()
Adds a column of type VARBINARY.
void
addVarchar ()
Adds a column of type VARCHAR.
Detailed Description
Represents (unsized) types of the columns used as input/output of a User Defined Function/Transform Function.
This class is used only for generating the function or transform function prototype, where the sizes and/or precisions of the data types are not known.
26 - com.vertica.sdk.ColumnTypes Member List
This is the complete list of members for com.vertica.sdk.ColumnTypes , including all inherited members.
addAny()
com.vertica.sdk.ColumnTypes
addBinary()
com.vertica.sdk.ColumnTypes
addBool()
com.vertica.sdk.ColumnTypes
addChar()
com.vertica.sdk.ColumnTypes
addDate()
com.vertica.sdk.ColumnTypes
addFloat()
com.vertica.sdk.ColumnTypes
addInt()
com.vertica.sdk.ColumnTypes
addInterval()
com.vertica.sdk.ColumnTypes
addIntervalYM()
com.vertica.sdk.ColumnTypes
addLongVarbinary()
com.vertica.sdk.ColumnTypes
addLongVarchar()
com.vertica.sdk.ColumnTypes
addNumeric()
com.vertica.sdk.ColumnTypes
addTime()
com.vertica.sdk.ColumnTypes
addTimestamp()
com.vertica.sdk.ColumnTypes
addTimestampTz()
com.vertica.sdk.ColumnTypes
addTimeTz()
com.vertica.sdk.ColumnTypes
addVarbinary()
com.vertica.sdk.ColumnTypes
addVarchar()
com.vertica.sdk.ColumnTypes
27 - com.vertica.sdk.ContinuousReader Class Reference
Inheritance diagram for com.vertica.sdk.ContinuousReader:
Collaboration diagram for com.vertica.sdk.ContinuousReader:
Public Member Functions
ContinuousReader (ContinuousUDParserLocks continuousUDParserLocks)
int
capacity ()
int
getBytesConsumed ()
CoroutineState
getCs ()
DataBuffer
getCurrentBuffer ()
byte
getDataAt (int pos)
int
getLastReservationSize ()
int
getPrev_reserved ()
InputState
getState ()
boolean
isEOF ()
boolean
isNeedInput ()
boolean
noMoreData ()
byte []
read (int n)
int
reserve (int size) throws UdfException
int
seek (int distance) throws UdfException
void
setCs (CoroutineState cs)
void
setCurrentBuffer (DataBuffer currentBuffer)
void
setLastReservationSize (int lastReservationSize)
void
setNeedInput (boolean needInput)
void
setPrev_reserved (int prev_reserved)
void
setState (InputState state)
Detailed Description
ContinuousReader intended for reading data
Member Function Documentation
◆ capacity()
int com.vertica.sdk.ContinuousStreamer.capacity()
inherited
Returns
Number of bytes reserved
◆ getBytesConsumed()
int com.vertica.sdk.ContinuousStreamer.getBytesConsumed()
inherited
Returns
returns the number of bytes consumed so far by the ContinuousStreamer.
◆ getCs()
CoroutineState com.vertica.sdk.ContinuousStreamer.getCs()
inherited
Returns
returns the Co-routine state.
◆ getCurrentBuffer()
DataBuffer com.vertica.sdk.ContinuousStreamer.getCurrentBuffer()
inherited
Returns
Returns current Buffer of the ContinuousStreamer.
◆ getDataAt()
byte com.vertica.sdk.ContinuousStreamer.getDataAt(int pos)
inherited
Parameters
pos: - the position at which data needs to be retrieved.
Returns
Returns the byte to the start of a buffer containing the next N bytes of the input stream, where n is equal to value returned by last call to reserve()
◆ getLastReservationSize()
int com.vertica.sdk.ContinuousStreamer.getLastReservationSize()
inherited
Returns
Returns the Last reservation size of the ContinuousStreamer.
◆ getPrev_reserved()
int com.vertica.sdk.ContinuousStreamer.getPrev_reserved()
inherited
Returns
returns the previous reservation size.
◆ getState()
InputState com.vertica.sdk.ContinuousStreamer.getState()
inherited
Returns
Returns the Input State of ContinuousStreamer.
◆ isEOF()
boolean com.vertica.sdk.ContinuousStreamer.isEOF()
inherited
Returns
true iff we have reached the end of input stream and no data can be reserved
boolean com.vertica.sdk.ContinuousStreamer.isNeedInput()
inherited
Returns
boolean flag to indicate whether more input is needed or not.
◆ noMoreData()
boolean com.vertica.sdk.ContinuousStreamer.noMoreData()
inherited
Returns
true iff no more data can be reserved. The current reservation can still be valid and of nonZero size
◆ read()
byte \[\] com.vertica.sdk.ContinuousReader.read(int n)
Reads upto 'n' bytes from the input stream, and copies them to a byte buffer.
A wrapper on top of reserve() and seek().
Note
Read is incompatible with row rejection at this time because the row to be rejected is no longer available to Vertica once it has been seek()'ed past. See reserve()/seek() API for an alternative that doesn't have this limitation.
Parameters
n: integer representing number of bytes to read.
Returns
byte array containing the bytes read.
◆ reserve()
int com.vertica.sdk.ContinuousStreamer.reserve(int size) throws UdfException
inherited
Parameters
size: integer indicating number of bytes to reserve. if size is less than or equal to capacity(), this call has no effect. Otherwise, it is a request to allocate more memory.
Returns
Returns size if at least 'size' bytes could be reserved, or some value smaller than 'size', indicating how many bytes were successfully reserved, if end_of_file was reached and fewer than 'size' bytes are available. check capacity to see how many bytes were reserved.
◆ seek()
int com.vertica.sdk.ContinuousStreamer.seek(int distance) throws UdfException
inherited
Seek forward in the input stream.
Attempt to seek forward 'distance' bytes. If this is successful then return 'distance'
if this is unsuccessful due to reaching the end of the input stream, return a value less than'distance' thant is equal to the number of bytes that have been consumed.
Calling seek() invalidates any reserved data; to guarantee that data is still available, it is necessary to call reserve() immediately after calling seek().
Parameters
distance: an integer indicating position to seek forward.
Returns
the actual distance the Streamer could seek
◆ setCs()
void com.vertica.sdk.ContinuousStreamer.setCs(CoroutineState cs)
inherited
Parameters
cs: used to set the Co-routine state
◆ setCurrentBuffer()
void com.vertica.sdk.ContinuousStreamer.setCurrentBuffer(DataBuffer currentBuffer)
inherited
Parameters
currentBuffer: used to set the currentBuffer of the ContinuousStreamer.
◆ setLastReservationSize()
void com.vertica.sdk.ContinuousStreamer.setLastReservationSize(int lastReservationSize)
inherited
Parameters
lastReservationSize: Used to set the lastReservationSize of the ContinuousStreamer
void com.vertica.sdk.ContinuousStreamer.setNeedInput(boolean needInput)
inherited
Parameters
needInput: used to set the needInput flag of ContinuousStreamer.
◆ setPrev_reserved()
void com.vertica.sdk.ContinuousStreamer.setPrev_reserved(int prev_reserved)
inherited
Parameters
prev_reserved: used to set the previous reservation size.
◆ setState()
void com.vertica.sdk.ContinuousStreamer.setState(InputState state)
inherited
Parameters
state: used to set the InputState of ContinuousStreamer.
28 - com.vertica.sdk.ContinuousReader Member List
This is the complete list of members for com.vertica.sdk.ContinuousReader , including all inherited members.
capacity() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
ContinuousReader(ContinuousUDParserLocks continuousUDParserLocks) (defined in com.vertica.sdk.ContinuousReader)
com.vertica.sdk.ContinuousReader
ContinuousStreamer(ContinuousUDParserLocks continuousUDParserLocks) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getBytesConsumed() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getCs() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getCurrentBuffer() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getDataAt(int pos) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getLastReservationSize() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getPrev_reserved() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
getState() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
isEOF() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
isNeedInput() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
noMoreData() (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
read(int n)
com.vertica.sdk.ContinuousReader
reserve(int size) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
seek(int distance) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setCs(CoroutineState cs) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setCurrentBuffer(DataBuffer currentBuffer) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setLastReservationSize(int lastReservationSize) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setNeedInput(boolean needInput) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setPrev_reserved(int prev_reserved) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
setState(InputState state) (defined in com.vertica.sdk.ContinuousStreamer)
com.vertica.sdk.ContinuousStreamer
29 - com.vertica.sdk.ContinuousRejecter Class Reference
Collaboration diagram for com.vertica.sdk.ContinuousRejecter:
Public Member Functions
ContinuousRejecter (ContinuousUDParserLocks continuousUDParserLocks)
void
reject (RejectedRecord rr) throws UdfException
Protected Attributes
boolean
haveRejectedRecord
RejectedRecord
rejectedRecord
Constructor & Destructor Documentation
◆ ContinuousRejecter()
com.vertica.sdk.ContinuousRejecter.ContinuousRejecter(ContinuousUDParserLocks continuousUDParserLocks)
Default Constructor
Parameters
continuousUDParserLocks: the locks
Member Function Documentation
◆ reject()
void com.vertica.sdk.ContinuousRejecter.reject(RejectedRecord rr) throws UdfException
Request that Vertica process the current raw data as a rejected row. Emit the rejected record via the rejected-rows mechanism specified in the COPY statement, with error message specified by 'reason', and delimited by the record terminator specified by 'recordTerminator'.
Parameters
rr: a RejectedRecord object
30 - com.vertica.sdk.ContinuousRejecter Member List
This is the complete list of members for com.vertica.sdk.ContinuousRejecter , including all inherited members.
ContinuousRejecter(ContinuousUDParserLocks continuousUDParserLocks)
com.vertica.sdk.ContinuousRejecter
haveRejectedRecord (defined in com.vertica.sdk.ContinuousRejecter)
com.vertica.sdk.ContinuousRejecter
protected
reject(RejectedRecord rr)
com.vertica.sdk.ContinuousRejecter
rejectedRecord (defined in com.vertica.sdk.ContinuousRejecter)
com.vertica.sdk.ContinuousRejecter
protected
31 - com.vertica.sdk.ContinuousUDParser Class Reference
Inheritance diagram for com.vertica.sdk.ContinuousUDParser:
Collaboration diagram for com.vertica.sdk.ContinuousUDParser:
Classes
enum
CoroutineState
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
deinitialize (ServerInterface srvInterface, SizedColumnTypes returnType)
final void
destroy (ServerInterface srvInterface, SizedColumnTypes returnTypes)
void
destroy (ServerInterface srvInterface, SizedColumnTypes returnType, SessionParamWriterMap udSessionParams) throws UdfException
ContinuousReader
getContinuousReader ()
ContinuousRejecter
getContinuousRejector ()
int
getRecordsAcceptedInBatch ()
RejectedRecord
getRejectedRecord ()
boolean
getSeenEOB ()
ServerInterface
getServerInterface ()
StreamWriter
getStreamWriter ()
void
increRecordsAcceptedInBatch ()
void
initialize (ServerInterface srvInterface, SizedColumnTypes returnType)
boolean
isCanceled ()
final StreamState
process (ServerInterface srvInterface, DataBuffer input, InputState input_state) throws UdfException,DestroyInvocation
abstract void
run () throws UdfException
void
setRecordsAcceptedInBatch (int i)
void
setSeenEOB (Boolean b)
void
setStreamWriter (StreamWriter writer)
final void
setup (ServerInterface srvInterface, SizedColumnTypes returnTypes) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Protected Attributes
int
recordsAcceptedInBatch
boolean
seen_eob
StreamWriter
writer
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ deinitialize()
void com.vertica.sdk.ContinuousUDParser.deinitialize(ServerInterface srvInterface, SizedColumnTypes returnType)
May optionally be overridden
Will be invoked during query execution, after run() has returned.
Parameters
srvInterface: a ServerInterface object.
returnType: a SizedColumnTypes object.
Referenced by com.vertica.sdk.ContinuousUDParser.destroy() .
◆ destroy()
final void com.vertica.sdk.ContinuousUDParser.destroy(ServerInterface srvInterface, SizedColumnTypes returnTypes)
De-initialization to be done for ContinuousUDParser .
Note
Internally implemented for ContinuousUDParser . Do not override.
Parameters
srvInterface: a ServerInterface object.
returnTypes: a SizedColumnTypes object.
◆ getContinuousReader()
ContinuousReader com.vertica.sdk.ContinuousUDParser.getContinuousReader()
Returns
returns ContinuousReader object of the ContinuousUDParser .
◆ getContinuousRejector()
ContinuousRejecter com.vertica.sdk.ContinuousUDParser.getContinuousRejector()
Returns
returns ContinuousRejector object of the ContinuousUDParser .
◆ getRejectedRecord()
RejectedRecord com.vertica.sdk.ContinuousUDParser.getRejectedRecord()
Returns
Returns information about the Rejected Record
◆ getServerInterface()
ServerInterface com.vertica.sdk.ContinuousUDParser.getServerInterface()
Returns
returns ServerInterface object of the ContinuousUDParser .
◆ initialize()
void com.vertica.sdk.ContinuousUDParser.initialize(ServerInterface srvInterface, SizedColumnTypes returnType)
May optionally be overridden
Will be invoked during query execution, prior to run() being called.
Parameters
srvInterface: a ServerInterface object.
returnType: a SizedColumnTypes object.
Referenced by com.vertica.sdk.ContinuousUDParser.setup() .
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ process()
final StreamState com.vertica.sdk.ContinuousUDParser.process(ServerInterface srvInterface, DataBuffer input, InputState input_state) throws UdfException,DestroyInvocation
Override the built-in process() method with internal logic for ContinuousUDParser . Abstract away the state-machine interface by stuffing run() into a coroutine. Whenever run() wants more data than we have right now, context-switch out of the coroutine and back into process() , and go get whatever run() needs.
Note
Internally implemented for ContinuousUDParser . Do not override.
Parameters
srvInterface: a ServerInterface Object
input: a DataBuffer object.
input_state: an InputState object.
◆ run()
abstract void com.vertica.sdk.ContinuousUDParser.run() throws UdfException
abstract
Method exposed to user to write their custom code
User-implemented method that processes data. Called exactly once per ContinuousUDParser instance. It should read data using the reserve() and seek() (or read()) methods, and write data using the standard UDParser StreamWriter . It should return once it has either finished processing the input stream, or it (for whatever reason) wants to close the input stream and not process any further data.
run() should be very careful about keeping pointers or references to internal values returned by methods on the ContinuousUDParser class. Unless documentation explicitly indicates that it is safe to do so, it is not safe to keep such pointers or references, even for objects (such as the server interface) that one might otherwise expect to be persistent. Instead, call the accessor function for each use.
◆ setup()
final void com.vertica.sdk.ContinuousUDParser.setup(ServerInterface srvInterface, SizedColumnTypes returnTypes) throws UdfException
Initialization to be done for ContinuousUDParser .
Note
Internally implemented for ContinuousUDParser . Do not override.
Parameters
srvInterface: a ServerInterface object.
returnTypes: a SizedColumnTypes object.
Member Data Documentation
◆ writer
StreamWriter com.vertica.sdk.UDParser.writer
protected inherited
Writer to write parsed tuples to. Has the same API as PartitionWriter , from the UDT framework.
32 - com.vertica.sdk.ContinuousUDParser Member List
This is the complete list of members for com.vertica.sdk.ContinuousUDParser , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
deinitialize(ServerInterface srvInterface, SizedColumnTypes returnType)
com.vertica.sdk.ContinuousUDParser
destroy(ServerInterface srvInterface, SizedColumnTypes returnTypes)
com.vertica.sdk.ContinuousUDParser
destroy(ServerInterface srvInterface, SizedColumnTypes returnType, SessionParamWriterMap udSessionParams) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getContinuousReader()
com.vertica.sdk.ContinuousUDParser
getContinuousRejector()
com.vertica.sdk.ContinuousUDParser
getRecordsAcceptedInBatch() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getRejectedRecord()
com.vertica.sdk.ContinuousUDParser
getSeenEOB() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getServerInterface()
com.vertica.sdk.ContinuousUDParser
getStreamWriter() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
increRecordsAcceptedInBatch() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
initialize(ServerInterface srvInterface, SizedColumnTypes returnType)
com.vertica.sdk.ContinuousUDParser
isCanceled()
com.vertica.sdk.UDXObject
process(ServerInterface srvInterface, DataBuffer input, InputState input_state)
com.vertica.sdk.ContinuousUDParser
recordsAcceptedInBatch (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
protected
run()
com.vertica.sdk.ContinuousUDParser
seen_eob (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
protected
setRecordsAcceptedInBatch(int i) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setSeenEOB(Boolean b) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setStreamWriter(StreamWriter writer) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setup(ServerInterface srvInterface, SizedColumnTypes returnTypes)
com.vertica.sdk.ContinuousUDParser
UDParser() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
writer
com.vertica.sdk.UDParser
protected
33 - com.vertica.sdk.ContinuousUDParser.CoroutineState Enum Reference
Collaboration diagram for com.vertica.sdk.ContinuousUDParser.CoroutineState:
Public Member Functions
int
getCode ()
Public Attributes
CLOSED =(3)
FINISHED =(2)
NOT_INITIALIZED =(0)
REPORT_ERROR =(4)
RUN_START =(1)
Detailed Description
Internal state of Coroutine context
34 - com.vertica.sdk.ContinuousUDParser.CoroutineState Member List
This is the complete list of members for com.vertica.sdk.ContinuousUDParser.CoroutineState , including all inherited members.
CLOSED (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
FINISHED (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
getCode() (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
NOT_INITIALIZED (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
REPORT_ERROR (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
RUN_START (defined in com.vertica.sdk.ContinuousUDParser.CoroutineState)
com.vertica.sdk.ContinuousUDParser.CoroutineState
35 - com.vertica.sdk.DataBuffer Class Reference
Collaboration diagram for com.vertica.sdk.DataBuffer:
Public Attributes
byte []
buf
int
offset
Detailed Description
DataBuffer is a a contiguous in-memory buffer of data.
Member Data Documentation
◆ buf
byte [] com.vertica.sdk.DataBuffer.buf
The buffer of data.
◆ offset
int com.vertica.sdk.DataBuffer.offset
An offset into the buffer that is typically used to track progress through the DataBuffer . For example, a UDParser advances the offset as it consumes data from the DataBuffer .
36 - com.vertica.sdk.DataBuffer Member List
This is the complete list of members for com.vertica.sdk.DataBuffer , including all inherited members.
buf
com.vertica.sdk.DataBuffer
offset
com.vertica.sdk.DataBuffer
37 - com.vertica.sdk.DefaultSourceIterator Class Reference
Inheritance diagram for com.vertica.sdk.DefaultSourceIterator:
Collaboration diagram for com.vertica.sdk.DefaultSourceIterator:
Public Member Functions
DefaultSourceIterator (ArrayList< UDSource > sources)
final void
cancelUDX (ServerInterface srvInterface)
UnsizedUDSource
createNextSource (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
int
getNumberOfSources ()
Integer
getSizeOfSource (int sourceNum)
boolean
isCanceled ()
void
setup (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy()
void com.vertica.sdk.SourceIterator.destroy(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
inherited
Tear down this SourceIterator
Should perform clean-up
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: a plan context
Exceptions
UdfException: UDF problem
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ setup()
void com.vertica.sdk.SourceIterator.setup(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
inherited
Set up this SourceIterator
Should perform setup that should not take place in the constructor due to the exception-handling semantics of constructors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: a plan context
Exceptions
UdfException: UDF problem
38 - com.vertica.sdk.DefaultSourceIterator Member List
This is the complete list of members for com.vertica.sdk.DefaultSourceIterator , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
createNextSource(ServerInterface srvInterface) (defined in com.vertica.sdk.DefaultSourceIterator)
com.vertica.sdk.DefaultSourceIterator
DefaultSourceIterator(ArrayList< UDSource > sources) (defined in com.vertica.sdk.DefaultSourceIterator)
com.vertica.sdk.DefaultSourceIterator
destroy(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceIterator
getNumberOfSources() (defined in com.vertica.sdk.DefaultSourceIterator)
com.vertica.sdk.DefaultSourceIterator
getSizeOfSource(int sourceNum) (defined in com.vertica.sdk.DefaultSourceIterator)
com.vertica.sdk.DefaultSourceIterator
isCanceled()
com.vertica.sdk.UDXObject
setup(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceIterator
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
39 - com.vertica.sdk.DestroyInvocation Class Reference
Inheritance diagram for com.vertica.sdk.DestroyInvocation:
Collaboration diagram for com.vertica.sdk.DestroyInvocation:
Detailed Description
Used to support canceling UDx and invoking the UDx's destroy call back function. This exception is thrown when Vertica needs to cancel the running UDx to jump out of current control flow
For UDx to work properly, please do not catch and handle this exception
40 - com.vertica.sdk.DFSConstants Class Reference
Collaboration diagram for com.vertica.sdk.DFSConstants:
Static Public Attributes
static final String
CLOSE_FLAG = "isCloseInProcess"
static final String
DIRECTORY = "is_directory"
static final String
EXCEPTION_IN_PROCESS_FLAG = "isThrowErrorInProcess"
static final String
FILE_PATH = "file_path"
static final String
LIST_DIR = "is_list_dir"
static final String
MODEL_NAME = "model_name"
static final String
OPEN_FLAG = "isBeforeProcess"
static final String
OVERWRITE = "is_overwrite"
static final String
PARENT_OBJECT_TYPE = "parentObjectType"
static final int
SEEK_CUR = 1
static final int
SEEK_END = 2
static final int
SEEK_SET = 0
static final String
SLEEP_SECONDS = "sleep_seconds"
static final String
UNIQUE_NAME = "is_unique_name"
41 - com.vertica.sdk.DFSConstants Member List
This is the complete list of members for com.vertica.sdk.DFSConstants , including all inherited members.
CLOSE_FLAG (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
DIRECTORY (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
EXCEPTION_IN_PROCESS_FLAG (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
FILE_PATH (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
LIST_DIR (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
MODEL_NAME (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
OPEN_FLAG (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
OVERWRITE (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
PARENT_OBJECT_TYPE (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
SEEK_CUR (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
SEEK_END (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
SEEK_SET (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
SLEEP_SECONDS (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
UNIQUE_NAME (defined in com.vertica.sdk.DFSConstants)
com.vertica.sdk.DFSConstants
static
42 - com.vertica.sdk.DFSFile Class Reference
Collaboration diagram for com.vertica.sdk.DFSFile:
Classes
enum
DFSDistribution
enum
DFSRootParentType
enum
DFSScope
Public Member Functions
DFSFile ()
DFSFile (ServerInterface srvInterface)
DFSFile (ServerInterface srvInterface, String fName) throws UdfException, DestroyInvocation
DFSFile (ServerInterface srvInterface, String fName, DFSRootParentType parentType, String parentName) throws UdfException, DestroyInvocation
DFSFile (String fName, FileManager fmgr) throws UdfException, DestroyInvocation
DFSFile (String fName, FileManager fmgr, boolean is_dir, boolean is_file, boolean exists, long fSize) throws UdfException, DestroyInvocation
void
create (DFSScope dfsScope, DFSDistribution dfsDistrib) throws UdfException, DestroyInvocation
int
deleteIt (boolean isRecursively) throws UdfException, DestroyInvocation
boolean
exists () throws UdfException
DFSRootParentType
getDFSRootParentType ()
DFSDistribution
getDistribution ()
FileManager
getFileManager ()
long
getFileWriter ()
String
getName ()
String
getRootDFSParentObjectName ()
DFSScope
getScope ()
ServerInterface
getServerInterface ()
long
getSize ()
DFSFileStatus
getStatus ()
boolean
isDir ()
boolean
isFile ()
List< DFSFile >
listFiles () throws UdfException, DestroyInvocation
void
setDir (boolean thisIsaDirectory)
void
setDistribution (DFSDistribution dfsDist)
void
setFile (boolean thisIsaFile)
void
setFileManager (ServerInterface srvInterface)
void
setName (String fName) throws UdfException, DestroyInvocation
void
setScope (DFSScope dfsScope)
void
setSize (long fSize)
void
setStatus (DFSFileStatus dfsStatus)
Detailed Description
The main class used by users to initiate DFS operations
Constructor & Destructor Documentation
◆ DFSFile()
com.vertica.sdk.DFSFile.DFSFile()
DFSFile INITIATION IS ONLY AVAILABLE DURING THE PLANNING/SETUP AND FINALIZE/DESTROY PHASES OF A PLAN. NOT AVAILABLE DURING EXECUTION/PROCESSING.
Member Function Documentation
◆ deleteIt()
int com.vertica.sdk.DFSFile.deleteIt(boolean isRecursively) throws UdfException, DestroyInvocation
Deletes a DFS file.
Parameters
isRecursively: delete recursively
Returns
0 is successful, throw exceptions if there are errors.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ listFiles()
List<DFSFile> com.vertica.sdk.DFSFile.listFiles() throws UdfException, DestroyInvocation
Lists files under the path specified by 'fileName'
Returns
a list of DFSFile found under the path.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
43 - com.vertica.sdk.DFSFile Member List
This is the complete list of members for com.vertica.sdk.DFSFile , including all inherited members.
create(DFSScope dfsScope, DFSDistribution dfsDistrib) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
deleteIt(boolean isRecursively)
com.vertica.sdk.DFSFile
DFSFile()
com.vertica.sdk.DFSFile
DFSFile(ServerInterface srvInterface) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
DFSFile(ServerInterface srvInterface, String fName) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
DFSFile(ServerInterface srvInterface, String fName, DFSRootParentType parentType, String parentName) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
DFSFile(String fName, FileManager fmgr) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
DFSFile(String fName, FileManager fmgr, boolean is_dir, boolean is_file, boolean exists, long fSize) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
exists() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getDFSRootParentType() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getDistribution() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getFileManager() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getFileWriter() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getName() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getRootDFSParentObjectName() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getScope() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getServerInterface() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getSize() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
getStatus() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
isDir() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
isFile() (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
listFiles()
com.vertica.sdk.DFSFile
setDir(boolean thisIsaDirectory) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setDistribution(DFSDistribution dfsDist) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setFile(boolean thisIsaFile) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setFileManager(ServerInterface srvInterface) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setName(String fName) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setScope(DFSScope dfsScope) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setSize(long fSize) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
setStatus(DFSFileStatus dfsStatus) (defined in com.vertica.sdk.DFSFile)
com.vertica.sdk.DFSFile
44 - com.vertica.sdk.DFSFile.DFSDistribution Enum Reference
Collaboration diagram for com.vertica.sdk.DFSFile.DFSDistribution:
Public Attributes
HINT_INITIATOR
HINT_REPLICATE
HINT_SEGMENTED
Detailed Description
Defines how a file is replicated across nodes in the cluster. Used at the file creation time.
45 - com.vertica.sdk.DFSFile.DFSDistribution Member List
This is the complete list of members for com.vertica.sdk.DFSFile.DFSDistribution , including all inherited members.
HINT_INITIATOR (defined in com.vertica.sdk.DFSFile.DFSDistribution)
com.vertica.sdk.DFSFile.DFSDistribution
HINT_REPLICATE (defined in com.vertica.sdk.DFSFile.DFSDistribution)
com.vertica.sdk.DFSFile.DFSDistribution
HINT_SEGMENTED (defined in com.vertica.sdk.DFSFile.DFSDistribution)
com.vertica.sdk.DFSFile.DFSDistribution
46 - com.vertica.sdk.DFSFile.DFSRootParentType Enum Reference
Collaboration diagram for com.vertica.sdk.DFSFile.DFSRootParentType:
Public Attributes
DATABASE
MODEL
Detailed Description
Enum to represent which object the root of DFSFile is attached to.
47 - com.vertica.sdk.DFSFile.DFSRootParentType Member List
This is the complete list of members for com.vertica.sdk.DFSFile.DFSRootParentType , including all inherited members.
DATABASE (defined in com.vertica.sdk.DFSFile.DFSRootParentType)
com.vertica.sdk.DFSFile.DFSRootParentType
MODEL (defined in com.vertica.sdk.DFSFile.DFSRootParentType)
com.vertica.sdk.DFSFile.DFSRootParentType
48 - com.vertica.sdk.DFSFile.DFSScope Enum Reference
Collaboration diagram for com.vertica.sdk.DFSFile.DFSScope:
Public Attributes
NS_GLOBAL
NS_SESSION
NS_TRANSACTION
Detailed Description
Defines the scope fo the file. Used at the file creation time.
49 - com.vertica.sdk.DFSFile.DFSScope Member List
This is the complete list of members for com.vertica.sdk.DFSFile.DFSScope , including all inherited members.
NS_GLOBAL (defined in com.vertica.sdk.DFSFile.DFSScope)
com.vertica.sdk.DFSFile.DFSScope
NS_SESSION (defined in com.vertica.sdk.DFSFile.DFSScope)
com.vertica.sdk.DFSFile.DFSScope
NS_TRANSACTION (defined in com.vertica.sdk.DFSFile.DFSScope)
com.vertica.sdk.DFSFile.DFSScope
50 - com.vertica.sdk.DFSFileReader Class Reference
Collaboration diagram for com.vertica.sdk.DFSFileReader:
Public Member Functions
DFSFileReader (DFSFile dfsFile)
void
close () throws UdfException, DestroyInvocation
boolean
isOpen ()
void
open () throws UdfException, DestroyInvocation
int
read (ByteBuffer buffer, int size) throws UdfException, DestroyInvocation
long
seek (long offset, int origin) throws UdfException, DestroyInvocation
long
size ()
Member Function Documentation
◆ close()
void com.vertica.sdk.DFSFileReader.close() throws UdfException, DestroyInvocation
Closes the file opened for reading
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ read()
int com.vertica.sdk.DFSFileReader.read(ByteBuffer buffer, int size) throws UdfException, DestroyInvocation
Reads 'size' of bytes into buffer pointed by 'ptr' from the file opened for reading.
Parameters
buffer: buffer to read into
size: number of bytes to read
Returns
number of bytes actually read, 0 if no bytes were read, indicates the EOF.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ seek()
long com.vertica.sdk.DFSFileReader.seek(long offset, int origin) throws UdfException, DestroyInvocation
Reposition the read file offset.
Parameters
offset: location to seek to
origin: origin from which to seek
Returns
the new file offset.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
51 - com.vertica.sdk.DFSFileReader Member List
This is the complete list of members for com.vertica.sdk.DFSFileReader , including all inherited members.
close()
com.vertica.sdk.DFSFileReader
DFSFileReader() (defined in com.vertica.sdk.DFSFileReader)
com.vertica.sdk.DFSFileReader
DFSFileReader(DFSFile dfsFile) (defined in com.vertica.sdk.DFSFileReader)
com.vertica.sdk.DFSFileReader
isOpen() (defined in com.vertica.sdk.DFSFileReader)
com.vertica.sdk.DFSFileReader
open() (defined in com.vertica.sdk.DFSFileReader)
com.vertica.sdk.DFSFileReader
read(ByteBuffer buffer, int size)
com.vertica.sdk.DFSFileReader
seek(long offset, int origin)
com.vertica.sdk.DFSFileReader
size() (defined in com.vertica.sdk.DFSFileReader)
com.vertica.sdk.DFSFileReader
52 - com.vertica.sdk.DFSFileStatus Enum Reference
Collaboration diagram for com.vertica.sdk.DFSFileStatus:
Public Attributes
READ_OPEN
WRITE_CREATED
WRITE_OPEN
Detailed Description
Internal DFSFile status to indicate its state
53 - com.vertica.sdk.DFSFileStatus Member List
This is the complete list of members for com.vertica.sdk.DFSFileStatus , including all inherited members.
READ_OPEN (defined in com.vertica.sdk.DFSFileStatus)
com.vertica.sdk.DFSFileStatus
WRITE_CREATED (defined in com.vertica.sdk.DFSFileStatus)
com.vertica.sdk.DFSFileStatus
WRITE_OPEN (defined in com.vertica.sdk.DFSFileStatus)
com.vertica.sdk.DFSFileStatus
54 - com.vertica.sdk.DFSFileWriter Class Reference
Collaboration diagram for com.vertica.sdk.DFSFileWriter:
Public Member Functions
DFSFileWriter (DFSFile dfsFile)
void
close () throws UdfException, DestroyInvocation
boolean
isOpen ()
void
open () throws UdfException, DestroyInvocation
int
write (ByteBuffer buffer) throws UdfException, DestroyInvocation
Member Function Documentation
◆ close()
void com.vertica.sdk.DFSFileWriter.close() throws UdfException, DestroyInvocation
Closes the file opened for writing.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ open()
void com.vertica.sdk.DFSFileWriter.open() throws UdfException, DestroyInvocation
Opens a file for writing.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ write()
int com.vertica.sdk.DFSFileWriter.write(ByteBuffer buffer) throws UdfException, DestroyInvocation
Writes bytes into the file from the ByteBuffer
Bytes are retrieved from the buffer starting from the current position till it's limit. Current position will be advanced depending on how many bytes are written.
Parameters
buffer: the ByteBuffer to write
Returns
number of bytes written, could be 0.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
55 - com.vertica.sdk.DFSFileWriter Member List
This is the complete list of members for com.vertica.sdk.DFSFileWriter , including all inherited members.
close()
com.vertica.sdk.DFSFileWriter
DFSFileWriter() (defined in com.vertica.sdk.DFSFileWriter)
com.vertica.sdk.DFSFileWriter
DFSFileWriter(DFSFile dfsFile) (defined in com.vertica.sdk.DFSFileWriter)
com.vertica.sdk.DFSFileWriter
isOpen() (defined in com.vertica.sdk.DFSFileWriter)
com.vertica.sdk.DFSFileWriter
open()
com.vertica.sdk.DFSFileWriter
write(ByteBuffer buffer)
com.vertica.sdk.DFSFileWriter
56 - com.vertica.sdk.ExecutorParamWriter Class Reference
Inheritance diagram for com.vertica.sdk.ExecutorParamWriter:
Collaboration diagram for com.vertica.sdk.ExecutorParamWriter:
Public Member Functions
ExecutorParamWriter (ParamReader params)
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
clearParameter (String fieldName)
boolean
containsParameter (String paramName)
boolean
getBoolean (int idx)
boolean
getBoolean (String paramName) throws UdfException
ByteBuffer
getColDataAreaRef (int idx)
ByteBuffer
getColRef (int idx)
java.sql.Date
getDate (String paramName) throws UdfException
java.sql.Date
getDate (int idx)
double
getDouble (int idx)
double
getDouble (String paramName) throws UdfException
int
getIndex (String paramName) throws UdfException
long
getLong (int idx)
long
getLong (String paramName) throws UdfException
int
getNumCols ()
int
getNumRows ()
ArrayList< String >
getParamNames ()
BaseDataOID
getProcessBlockUserInfoVectorAt (int i)
String
getString (String paramName) throws UdfException
String
getString (int idx)
int
getStringLength (String paramName) throws UdfException
int
getStringLength (int idx)
int
getStringLoc (int idx)
java.sql.Timestamp
getTimestamp (String paramName) throws UdfException
java.sql.Timestamp
getTimestamp (int idx)
VerticaType
getType (String paramName) throws UdfException
SizedColumnTypes
getTypeMetaData ()
VNumeric
getVNumeric (String paramName) throws UdfException
VNumeric
getVNumeric (int idx)
VString
getVString (String paramName) throws UdfException
VString
getVString (int idx)
boolean
isBooleanNull (int idx)
boolean
isBooleanNull (String paramName) throws UdfException
boolean
isDateNull (String paramName) throws UdfException
boolean
isDateNull (int idx)
boolean
isDoubleNull (int idx)
boolean
isDoubleNull (String paramName) throws UdfException
boolean
isEmpty ()
boolean
isLongNull (int idx)
boolean
isLongNull (String paramName) throws UdfException
boolean
isStringNull (String paramName) throws UdfException
boolean
isStringNull (int idx)
boolean
isTimestampInfinite (String paramName) throws UdfException
boolean
isTimestampInfinite (int idx)
boolean
isTimestampInfiniteNeg (String paramName) throws UdfException
boolean
isTimestampInfiniteNeg (int idx)
boolean
isTimestampInfinitePos (String paramName) throws UdfException
boolean
isTimestampInfinitePos (int idx)
boolean
isTimestampNull (String paramName) throws UdfException
boolean
isTimestampNull (int idx)
boolean
next () throws UdfException, DestroyInvocation
void
resetBuffers ()
void
setBool (String fieldName, boolean r) throws UdfException
Adds a BOOLEAN value to the output row.
void
setDate (String fieldName, java.sql.Date r) throws UdfException
Adds a DATE value to the output row.
void
setDouble (String fieldName, double r) throws UdfException
Adds a FLOAT value to the output row.
void
setLong (String fieldName, Long r) throws UdfException
Adds a LONG INTEGER value to the output row.
void
setLongString (String fieldName, String r) throws UdfException
Adds a Long String value to the output row.
void
setNumeric (String fieldName, BigDecimal bd)
Allocate a new VNumeric object to use as output.
void
setObjects (Map< String, Object > objects)
void
setString (String fieldName, String r) throws UdfException
Adds a String value to the output row.
void
setTimestamp (String fieldName, java.sql.Timestamp r) throws UdfException
Adds a TIMESTAMP value to the output row.
void
setTimestampInfiniteNeg (String fieldName) throws UdfException
void
setTimestampInfinitePos (String fieldName) throws UdfException
Map< String, Object >
viewObjects ()
Public Attributes
int
count
int
index
int
ncols
int
nrows
HashMap< String, Integer >
paramNameToIndex
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
An ExecutorParamWriter is a ParamWriter whose scope is limited to a single executor node - it will never be serialized for transfer to a different node. As a result, any object which is allocated from a Vertica memory pool (i.e. a ServerInterface 's allocator object) can have its address saved in the ExecutorParamWriter (see setPointer()), and be safely retrieved later on (see getPointer()) from a different API call in the same query.
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
◆ containsParameter()
boolean com.vertica.sdk.ParamReader.containsParameter(String paramName)
inherited
Function to see if the ParamReader has a value for the parameter
Parameters
paramName: parameter name to check
Returns
true if it does
◆ getBoolean()
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.
◆ 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
◆ getDate()
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.
◆ getDouble()
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.
◆ 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
◆ getLong()
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
◆ 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.
◆ getParamNames()
ArrayList<String> com.vertica.sdk.ParamReader.getParamNames()
inherited
Returns
all names of parameters stored in this ParamReader
◆ getString()
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.
◆ getStringLength()
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
◆ getStringLoc()
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() .
◆ getTimestamp()
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'.
◆ getType()
VerticaType com.vertica.sdk.ParamReader.getType(String paramName) throws UdfException
inherited
Parameters
paramName: parameter name
Returns
the type of the given parameter
Exceptions
UdfException: UDF problem
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ getVNumeric()
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.
◆ getVString()
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() .
◆ isBooleanNull()
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.
◆ isDateNull()
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() .
◆ isDoubleNull()
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.
◆ isEmpty()
boolean com.vertica.sdk.ParamReader.isEmpty()
inherited
Returns
true if there are no parameters
◆ isLongNull()
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
◆ isStringNull()
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() .
◆ isTimestampInfinite()
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() .
◆ isTimestampInfiniteNeg()
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() .
◆ isTimestampInfinitePos()
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() .
◆ isTimestampNull()
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() .
◆ next()
boolean com.vertica.sdk.BlockReader.next() throws UdfException, DestroyInvocation
inherited
Advance to the next record.
Returns
true if there are more rows to read, false otherwise.
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
◆ setBool()
void com.vertica.sdk.ParamWriter.setBool(String fieldName, boolean r) throws UdfException
inherited
Adds a BOOLEAN value to the output row.
Parameters
r: The BOOLEAN value to insert into the output row.
◆ setDate()
void com.vertica.sdk.ParamWriter.setDate(String fieldName, java.sql.Date r) throws UdfException
inherited
Adds a DATE value to the output row.
Parameters
r: The DATE value to insert into the output row.
◆ setDouble()
void com.vertica.sdk.ParamWriter.setDouble(String fieldName, double r) throws UdfException
inherited
Adds a FLOAT value to the output row.
Parameters
r: The FLOAT value to insert into the output row.
◆ setLong()
void com.vertica.sdk.ParamWriter.setLong(String fieldName, Long r) throws UdfException
inherited
Adds a LONG INTEGER value to the output row.
Parameters
r: The LONG INTEGER value to insert into the output row.
Referenced by
◆ setLongString()
void com.vertica.sdk.ParamWriter.setLongString(String fieldName, String r) throws UdfException
inherited
Adds a Long String value to the output row.
Parameters
r: The Long String value to insert into the output row.
◆ setNumeric()
void com.vertica.sdk.ParamWriter.setNumeric(String fieldName, BigDecimal bd)
inherited
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.ParamWriter.setString(String fieldName, String r) throws UdfException
inherited
Adds a String value to the output row.
Parameters
r: The String value to insert into the output row.
◆ setTimestamp()
void com.vertica.sdk.ParamWriter.setTimestamp(String fieldName, java.sql.Timestamp r) throws UdfException
inherited
Adds a TIMESTAMP value to the output row.
Parameters
r: The TIMESTAMP value to insert into the output row.
57 - com.vertica.sdk.ExecutorParamWriter Member List
This is the complete list of members for com.vertica.sdk.ExecutorParamWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
clearParameter(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
containsParameter(String paramName)
com.vertica.sdk.ParamReader
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
ExecutorParamWriter() (defined in com.vertica.sdk.ExecutorParamWriter)
com.vertica.sdk.ExecutorParamWriter
ExecutorParamWriter(ParamReader params) (defined in com.vertica.sdk.ExecutorParamWriter)
com.vertica.sdk.ExecutorParamWriter
getBoolean(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDouble(int idx)
com.vertica.sdk.BlockReader
getIndex(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getParamNames()
com.vertica.sdk.ParamReader
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getTimestamp(int idx)
com.vertica.sdk.BlockReader
getType(String paramName)
com.vertica.sdk.ParamReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isEmpty()
com.vertica.sdk.ParamReader
isLongNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isLongNull(int idx)
com.vertica.sdk.BlockReader
isStringNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next()
com.vertica.sdk.BlockReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
paramNameToIndex (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
ParamReader() (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
ParamWriter() (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
ParamWriter(ParamReader params) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBool(String fieldName, boolean r)
com.vertica.sdk.ParamWriter
setDate(String fieldName, java.sql.Date r)
com.vertica.sdk.ParamWriter
setDouble(String fieldName, double r)
com.vertica.sdk.ParamWriter
setLong(String fieldName, Long r)
com.vertica.sdk.ParamWriter
setLongString(String fieldName, String r)
com.vertica.sdk.ParamWriter
setNumeric(String fieldName, BigDecimal bd)
com.vertica.sdk.ParamWriter
setObjects(Map< String, Object > objects) (defined in com.vertica.sdk.ExecutorParamWriter)
com.vertica.sdk.ExecutorParamWriter
setString(String fieldName, String r)
com.vertica.sdk.ParamWriter
setTimestamp(String fieldName, java.sql.Timestamp r)
com.vertica.sdk.ParamWriter
setTimestampInfiniteNeg(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
setTimestampInfinitePos(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
viewObjects() (defined in com.vertica.sdk.ExecutorParamWriter)
com.vertica.sdk.ExecutorParamWriter
58 - com.vertica.sdk.ExecutorPlanContext Class Reference
Inheritance diagram for com.vertica.sdk.ExecutorPlanContext:
Collaboration diagram for com.vertica.sdk.ExecutorPlanContext:
Public Member Functions
ExecutorPlanContext (ExecutorParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource, int maxAllowedThreads)
ExecutorPlanContext (ExecutorParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource, int maxAllowedThreads, int actualThreads)
boolean
canApportionSource ()
ArrayList< String >
getClusterNodes ()
int
getLoadConcurrency ()
int
getMaxAllowedThreads ()
ParamReader
getReader ()
SourceIterator
getSources ()
ArrayList< String >
getTargetNodes ()
ExecutorParamWriter
getWriter ()
void
setSources (SourceIterator sources)
void
setTargetNodes (ArrayList< String > nodes) throws UdfException
Detailed Description
A PlanContext object whose scope is limited to a single executor node: it and its parameters will never be serialized. In addition to providing information about nodes involved in a query, it indicates how many threads are available and allocated for a load. This class is used for UDLs.
Member Function Documentation
◆ getClusterNodes()
ArrayList<String> com.vertica.sdk.PlanContext.getClusterNodes()
inherited
Returns
A list of all of the nodes in the current cluster, by node name
Referenced by com.vertica.sdk.NodeSpecifyingPlanContext.setTargetNodes() .
◆ getReader()
ParamReader com.vertica.sdk.PlanContext.getReader()
inherited
Returns
A read-only instance of the current context
◆ getTargetNodes()
ArrayList<String> com.vertica.sdk.NodeSpecifyingPlanContext.getTargetNodes()
inherited
Returns
The set of nodes that this query is currently set to run on
◆ setTargetNodes()
void com.vertica.sdk.NodeSpecifyingPlanContext.setTargetNodes(ArrayList< String > nodes) throws UdfException
inherited
Change the set of nodes that the query is intended to run on.
Parameters
Exceptions
UdfException: if any of the specified node names is not actually the name of any node in the cluster.
59 - com.vertica.sdk.ExecutorPlanContext Member List
This is the complete list of members for com.vertica.sdk.ExecutorPlanContext , including all inherited members.
canApportionSource() (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
ExecutorPlanContext(ExecutorParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource, int maxAllowedThreads) (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
ExecutorPlanContext(ExecutorParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource, int maxAllowedThreads, int actualThreads) (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
getClusterNodes()
com.vertica.sdk.PlanContext
getLoadConcurrency() (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
getMaxAllowedThreads() (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
getReader()
com.vertica.sdk.PlanContext
getSources() (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
getTargetNodes()
com.vertica.sdk.NodeSpecifyingPlanContext
getWriter() (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
NodeSpecifyingPlanContext(ParamWriter writer, ArrayList< String > clusterNodes, boolean canApportionSource) (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
NodeSpecifyingPlanContext(ParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource) (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
PlanContext(ParamWriter writer, ArrayList< String > clusterNodes) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
PlanContext(ParamWriter writer) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
setSources(SourceIterator sources) (defined in com.vertica.sdk.ExecutorPlanContext)
com.vertica.sdk.ExecutorPlanContext
setTargetNodes(ArrayList< String > nodes)
com.vertica.sdk.NodeSpecifyingPlanContext
60 - com.vertica.sdk.FileManager Class Reference
Collaboration diagram for com.vertica.sdk.FileManager:
Public Member Functions
abstract void
closeReader (long readerID) throws UdfException, DestroyInvocation
abstract void
closeWriter (long writerID) throws UdfException, DestroyInvocation
abstract int
deleteIt (String fileName, boolean isRecursively) throws UdfException, DestroyInvocation
abstract void
finalize ()
abstract boolean
initDFSFile (DFSFile file) throws UdfException, DestroyInvocation
abstract List< DFSFile >
listFiles (String fileName) throws UdfException, DestroyInvocation
abstract long
openForRead (String fileName, DFSFile.DFSRootParentType parentType, String parentName) throws UdfException, DestroyInvocation
abstract long
openForWrite (String fileName, DFSFile.DFSScope dfsScope, DFSFile.DFSDistribution dfsDistrib) throws UdfException, DestroyInvocation
abstract int
read (long readerID, ByteBuffer buffer, int size) throws UdfException, DestroyInvocation
abstract long
seek (long readerID, long offset, int origin) throws UdfException, DestroyInvocation
abstract long
size (long readerID) throws UdfException, DestroyInvocation
abstract int
write (long writerID, ByteBuffer buffer) throws UdfException, DestroyInvocation
Detailed Description
File Manager is a session level co-ordinator, which will be used by DFSFile , DFSFileReader and DFSFileWriter to interact with Catalog and Storage system of Vertica.
Member Function Documentation
◆ closeReader()
abstract void com.vertica.sdk.FileManager.closeReader(long readerID) throws UdfException, DestroyInvocation
abstract
Closes the file opened for reading, identified by 'readerID'
Parameters
readerID: id of the reader to close
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileReader.close() .
◆ closeWriter()
abstract void com.vertica.sdk.FileManager.closeWriter(long writerID) throws UdfException, DestroyInvocation
abstract
Closes the file opened for writing, identified by 'writerID'
Parameters
writerID: id of the writer to close
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileWriter.close() .
◆ deleteIt()
abstract int com.vertica.sdk.FileManager.deleteIt(String fileName, boolean isRecursively) throws UdfException, DestroyInvocation
abstract
Deletes a DFSFile , identified by full path 'fileName'.
Parameters
fileName: the file or directory to delete
isRecursively: whether to delete recursively
Returns
0 if successful, throw exceptions if there are errors
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFile.deleteIt() .
◆ finalize()
abstract void com.vertica.sdk.FileManager.finalize()
abstract
Finalizes a plan/query/statement. Should only invoke on the initiator node of a query. Complete file replication and commit metadata into the catalog. returns nothing, throws exceptions if there are errors.
◆ initDFSFile()
abstract boolean com.vertica.sdk.FileManager.initDFSFile(DFSFile file) throws UdfException, DestroyInvocation
abstract
Initialize a DFSFile upon constructing.
Parameters
file: the DFS file to initialize
Returns
true if file exists in the DFS, false otherwise
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ listFiles()
abstract List<DFSFile> com.vertica.sdk.FileManager.listFiles(String fileName) throws UdfException, DestroyInvocation
abstract
Lists file under the path specified by 'fileName'
Parameters
fileName: name of file/directory to list
Returns
a list of DFSFile found under the path.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFile.listFiles() .
◆ openForRead()
abstract long com.vertica.sdk.FileManager.openForRead(String fileName, DFSFile.DFSRootParentType parentType, String parentName) throws UdfException, DestroyInvocation
abstract
Opens a file for reading
Parameters
fileName: the filename
parentType: type of the parent
parentName: name of the parent
Returns
A unique identifier for the file opened. Return value is less than 0 if there are errors
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ openForWrite()
abstract long com.vertica.sdk.FileManager.openForWrite(String fileName, DFSFile.DFSScope dfsScope, DFSFile.DFSDistribution dfsDistrib) throws UdfException, DestroyInvocation
abstract
Opens a file for writing
Parameters
fileName: name of file
dfsScope: scope
dfsDistrib: distribution
Returns
A unique identifier for the file opened. Return value is less tan 0 if there are errors
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileWriter.open() .
◆ read()
abstract int com.vertica.sdk.FileManager.read(long readerID, ByteBuffer buffer, int size) throws UdfException, DestroyInvocation
abstract
Reads 'size' of bytes into buffer from the file identified by 'readerID'.
Parameters
readerID: id of the file reader
buffer: ByteBuffer to read into
size: number of bytes to read
Returns
number of bytes actually read, 0 if no bytes were read, indicates the EOF.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileReader.read() .
◆ seek()
abstract long com.vertica.sdk.FileManager.seek(long readerID, long offset, int origin) throws UdfException, DestroyInvocation
abstract
Reposition the read file offset
Parameters
readerID: id of the file reader
offset: offset to seek to
origin: origin from which to seek
Returns
the new file offset.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileReader.seek() .
◆ size()
abstract long com.vertica.sdk.FileManager.size(long readerID) throws UdfException, DestroyInvocation
abstract
Get size of file identified by 'readerID'
Parameters
readerID: id of the file reader
Returns
file size
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ write()
abstract int com.vertica.sdk.FileManager.write(long writerID, ByteBuffer buffer) throws UdfException, DestroyInvocation
abstract
Writes bytes into the file identified by 'writerID' from the buffer.
Bytes are retrieved from buffer starting from the current position till it's limit. Current position will be advanced depending on how many bytes are written.
Parameters
writerID: id of the writer
buffer: ByteBuffer from which to write
Returns
number of bytes actually written, less than 0 if there are any errors.
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
Referenced by com.vertica.sdk.DFSFileWriter.write() .
61 - com.vertica.sdk.FileManager Member List
This is the complete list of members for com.vertica.sdk.FileManager , including all inherited members.
closeReader(long readerID)
com.vertica.sdk.FileManager
closeWriter(long writerID)
com.vertica.sdk.FileManager
deleteIt(String fileName, boolean isRecursively)
com.vertica.sdk.FileManager
finalize()
com.vertica.sdk.FileManager
initDFSFile(DFSFile file)
com.vertica.sdk.FileManager
listFiles(String fileName)
com.vertica.sdk.FileManager
openForRead(String fileName, DFSFile.DFSRootParentType parentType, String parentName)
com.vertica.sdk.FileManager
openForWrite(String fileName, DFSFile.DFSScope dfsScope, DFSFile.DFSDistribution dfsDistrib)
com.vertica.sdk.FileManager
read(long readerID, ByteBuffer buffer, int size)
com.vertica.sdk.FileManager
seek(long readerID, long offset, int origin)
com.vertica.sdk.FileManager
size(long readerID)
com.vertica.sdk.FileManager
write(long writerID, ByteBuffer buffer)
com.vertica.sdk.FileManager
62 - com.vertica.sdk.FilterFactory Class Reference
Inheritance diagram for com.vertica.sdk.FilterFactory:
Collaboration diagram for com.vertica.sdk.FilterFactory:
Public Member Functions
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
UDXType
getUDXFactoryType ()
void
plan (ServerInterface srvInterface, PlanContext planCtxt) throws UdfException
abstract UDFilter
prepare (ServerInterface srvInterface, PlanContext planCtxt) throws UdfException
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Produces and initializes UDFilters to transform input data before parsing.
Note that FilterFactories are singletons. Subclasses should be stateless, with no fields containing data, just methods. plan() and prepare() methods must never modify any global variables or state; they may only modify the variables that they are given as arguments.
Member Function Documentation
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources()
void com.vertica.sdk.UDLFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
void com.vertica.sdk.UDLFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
inherited
Provides the argument and return types of the UDL. UDL's take no input tuples; as such, their prototype is empty.
◆ getReturnType()
void com.vertica.sdk.UDLFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
inherited
Not used in this form
◆ plan()
void com.vertica.sdk.FilterFactory.plan(ServerInterface srvInterface, PlanContext planCtxt) throws UdfException
Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on (through srvInterface).
plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare() .
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
Exceptions
UdfException: UDF problem
◆ prepare()
abstract UDFilter com.vertica.sdk.FilterFactory.prepare(ServerInterface srvInterface, PlanContext planCtxt) throws UdfException
abstract
Initialize a UDFilter . This function will be called on each node, prior to the Load operator starting to execute.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
Returns
UDFilter instance to use for this query
Exceptions
UdfException: UDF problem
63 - com.vertica.sdk.FilterFactory Member List
This is the complete list of members for com.vertica.sdk.FilterFactory , including all inherited members.
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res) (defined in com.vertica.sdk.UDLFactory)
com.vertica.sdk.UDLFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDLFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDLFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDLFactory
getUDXFactoryType() (defined in com.vertica.sdk.FilterFactory)
com.vertica.sdk.FilterFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
plan(ServerInterface srvInterface, PlanContext planCtxt)
com.vertica.sdk.FilterFactory
prepare(ServerInterface srvInterface, PlanContext planCtxt)
com.vertica.sdk.FilterFactory
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
64 - com.vertica.sdk.IdentComparator Class Reference
Inheritance diagram for com.vertica.sdk.IdentComparator:
Collaboration diagram for com.vertica.sdk.IdentComparator:
Public Member Functions
int
compare (String a, String b)
Static Public Member Functions
static IdentComparator
getInstance ()
Detailed Description
Compares two SQL Identifiers; for example, column names. SQL Identifiers are case and locale insensitive.
Warning: The current implementation handles ASCII identifiers only; For performance reasons, input values are not checked for non-ASCII characters. Future implementations will provide support for all non-ASCII identifiers. Using this comparator now will ensure ease of upgrade in the future.
Member Function Documentation
◆ getInstance()
static IdentComparator com.vertica.sdk.IdentComparator.getInstance()
static
Retrieve a singleton instance of IdentComparator . IdentComparator is stateless and threadsafe.
Returns
Instance of IdentComparator
Referenced by com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector.keyForIdent() .
65 - com.vertica.sdk.IdentComparator Member List
This is the complete list of members for com.vertica.sdk.IdentComparator , including all inherited members.
compare(String a, String b) (defined in com.vertica.sdk.IdentComparator)
com.vertica.sdk.IdentComparator
getInstance()
com.vertica.sdk.IdentComparator
static
66 - com.vertica.sdk.IterativeSourceFactory Class Reference
Inheritance diagram for com.vertica.sdk.IterativeSourceFactory:
Collaboration diagram for com.vertica.sdk.IterativeSourceFactory:
Public Member Functions
int
getDesiredThreads (ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
UDXType
getUDXFactoryType ()
boolean
isSourceApportionable ()
void
plan (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
SourceIterator
prepare (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
SourceIterator
prepare (ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Source factory that works with a SourceIterator to produce UDSources.
Usually it is easier to subclass SourceFactory and have its prepareUDSources() method return a vector of UDSource objects. Behind the scenes, Vertica uses a built-in iterator to pull sources from that vector. However, if you need to be able to control source management at this level, you can instead write your own SourceIterator and use it with an IterativeSourceFactory .
This class performs initial validation and planning of a query, before it is distributed over the network. It also instantiates objects to perform further initialization on each node, once the query has been distributed.
Note that SourceFactories are singletons. Subclasses should be stateless, with no fields containing data, just methods. plan() and prepare() methods must never modify any global variables or state; they may only modify the variables that they are given as arguments. (If global state must be modified, use SourceIterator .)
Member Function Documentation
◆ getDesiredThreads()
int com.vertica.sdk.IterativeSourceFactory.getDesiredThreads(ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Request the number of threads that the SourceFactory wants to use. This function is called on each node before prepare() .
'planCtxt' contains the same parameters stored by plan() method. It also exposes the maximum number of allowed threads, via 'getMaxAllowedThreads()'. Further computations can be stored in its 'ExecutorParamWriter ' object, for use in prepare() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: plan context specifying nodes
Returns
number of threads the SourceFactory wants to use
Exceptions
UdfException: UDF problem
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources()
void com.vertica.sdk.UDLFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
void com.vertica.sdk.UDLFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
inherited
Provides the argument and return types of the UDL. UDL's take no input tuples; as such, their prototype is empty.
◆ getReturnType()
void com.vertica.sdk.UDLFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
inherited
Not used in this form
◆ isSourceApportionable()
boolean com.vertica.sdk.IterativeSourceFactory.isSourceApportionable()
Returns
if this source factory has the capability to generate source with portions
◆ plan()
void com.vertica.sdk.IterativeSourceFactory.plan(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on.
plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: plan context specifying nodes
Exceptions
UdfException: UDF problem
◆ prepare() [1/2]
SourceIterator com.vertica.sdk.IterativeSourceFactory.prepare(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Prepare this SourceFactory to start creating sources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup.
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan() and getDesiredThreads(). It also provides functionality for determining which nodes this query is running on.
Returns
A SourceIterator object for use in the query.
Exceptions
UdfException: UDF problem
Referenced by com.vertica.sdk.IterativeSourceFactory.prepare() .
◆ prepare() [2/2]
SourceIterator com.vertica.sdk.IterativeSourceFactory.prepare(ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Prepare this SourceFactory to start creating sources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup.
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan() and getDesiredThreads(). It provides functionality for determining which nodes this query is running on, as well as the number of threads allowed by the resource pool (via getMaxAllowedThreads()) and, more importantly, the actual load concurrency (via getLoadConcurrency()).
Returns
A SourceIterator object for use in the query.
Exceptions
UdfException: UDF problem
67 - com.vertica.sdk.IterativeSourceFactory Member List
This is the complete list of members for com.vertica.sdk.IterativeSourceFactory , including all inherited members.
getDesiredThreads(ServerInterface srvInterface, ExecutorPlanContext planCtxt)
com.vertica.sdk.IterativeSourceFactory
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res) (defined in com.vertica.sdk.UDLFactory)
com.vertica.sdk.UDLFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDLFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDLFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDLFactory
getUDXFactoryType() (defined in com.vertica.sdk.IterativeSourceFactory)
com.vertica.sdk.IterativeSourceFactory
isSourceApportionable()
com.vertica.sdk.IterativeSourceFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
plan(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.IterativeSourceFactory
prepare(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.IterativeSourceFactory
prepare(ServerInterface srvInterface, ExecutorPlanContext planCtxt)
com.vertica.sdk.IterativeSourceFactory
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
68 - com.vertica.sdk.MultiPhaseTransformFunctionFactory Class Reference
Inheritance diagram for com.vertica.sdk.MultiPhaseTransformFunctionFactory:
Collaboration diagram for com.vertica.sdk.MultiPhaseTransformFunctionFactory:
Public Member Functions
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
abstract void
getPhases (ServerInterface srvInterface, Vector< TransformFunctionPhase > phases)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
UDXType
getUDXFactoryType ()
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Interface for declaring parameters and return types for, and instantiating, an associated multi-phase transform function. This class is similar to, but not a subclass of, TransformFunctionFactory .
A multi-phase transform function is made up of TransformFunctionPhase instances. For each phase of your transform, extend this class (not TransformFunction ). In getPhases() , return a vector of instances of those classes. Semantically, getPhases() replaces TransformFunctionFactory.createTransformFunction() .
Member Function Documentation
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources() [1/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources() .
◆ getPerInstanceResources() [2/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPhases()
abstract void com.vertica.sdk.MultiPhaseTransformFunctionFactory.getPhases(ServerInterface srvInterface, Vector< TransformFunctionPhase > phases)
abstract
Called when Vertica needs a new TransformFunctionPhase pipeline to process a multi-phase UDTF function call. Vertica invokes the phases in order; collectively they behave like a TransformFunction .
Note
More than one object may be instantiated per query.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
phases: output TransformFunctionPhase objects
◆ getUDXFactoryType()
UDXType com.vertica.sdk.MultiPhaseTransformFunctionFactory.getUDXFactoryType()
Returns
the object type internally used by Vertica
69 - com.vertica.sdk.MultiPhaseTransformFunctionFactory Member List
This is the complete list of members for com.vertica.sdk.MultiPhaseTransformFunctionFactory , including all inherited members.
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFactory
getPhases(ServerInterface srvInterface, Vector< TransformFunctionPhase > phases)
com.vertica.sdk.MultiPhaseTransformFunctionFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType) (defined in com.vertica.sdk.MultiPhaseTransformFunctionFactory)
com.vertica.sdk.MultiPhaseTransformFunctionFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) (defined in com.vertica.sdk.MultiPhaseTransformFunctionFactory)
com.vertica.sdk.MultiPhaseTransformFunctionFactory
getUDXFactoryType()
com.vertica.sdk.MultiPhaseTransformFunctionFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
70 - com.vertica.sdk.NodeSpecifyingPlanContext Class Reference
Inheritance diagram for com.vertica.sdk.NodeSpecifyingPlanContext:
Collaboration diagram for com.vertica.sdk.NodeSpecifyingPlanContext:
Public Member Functions
NodeSpecifyingPlanContext (ParamWriter writer, ArrayList< String > clusterNodes, boolean canApportionSource)
NodeSpecifyingPlanContext (ParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource)
boolean
canApportionSource ()
ArrayList< String >
getClusterNodes ()
ParamReader
getReader ()
ArrayList< String >
getTargetNodes ()
ParamWriter
getWriter ()
void
setTargetNodes (ArrayList< String > nodes) throws UdfException
Detailed Description
Interface that allows storage of query-plan state, when different parts of query planning take place on different computers. For example, if some work is done on the query initiator node and some is done on each node executing the query.
In addition to the functionality provided by PlanContext , NodeSpecifyingPlanContext allows you to specify which nodes the query should run on. This is used for UDLs.
Member Function Documentation
◆ getClusterNodes()
ArrayList<String> com.vertica.sdk.PlanContext.getClusterNodes()
inherited
Returns
A list of all of the nodes in the current cluster, by node name
Referenced by com.vertica.sdk.NodeSpecifyingPlanContext.setTargetNodes() .
◆ getReader()
ParamReader com.vertica.sdk.PlanContext.getReader()
inherited
Returns
A read-only instance of the current context
◆ getTargetNodes()
ArrayList<String> com.vertica.sdk.NodeSpecifyingPlanContext.getTargetNodes()
Returns
The set of nodes that this query is currently set to run on
◆ getWriter()
ParamWriter com.vertica.sdk.PlanContext.getWriter()
inherited
Returns
The current context for writing
◆ setTargetNodes()
void com.vertica.sdk.NodeSpecifyingPlanContext.setTargetNodes(ArrayList< String > nodes) throws UdfException
Change the set of nodes that the query is intended to run on.
Parameters
Exceptions
UdfException: if any of the specified node names is not actually the name of any node in the cluster.
71 - com.vertica.sdk.NodeSpecifyingPlanContext Member List
This is the complete list of members for com.vertica.sdk.NodeSpecifyingPlanContext , including all inherited members.
canApportionSource() (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
getClusterNodes()
com.vertica.sdk.PlanContext
getReader()
com.vertica.sdk.PlanContext
getTargetNodes()
com.vertica.sdk.NodeSpecifyingPlanContext
getWriter()
com.vertica.sdk.PlanContext
NodeSpecifyingPlanContext(ParamWriter writer, ArrayList< String > clusterNodes, boolean canApportionSource) (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
NodeSpecifyingPlanContext(ParamWriter writer, ArrayList< String > clusterNodes, ArrayList< String > targetNodes, boolean canApportionSource) (defined in com.vertica.sdk.NodeSpecifyingPlanContext)
com.vertica.sdk.NodeSpecifyingPlanContext
PlanContext(ParamWriter writer, ArrayList< String > clusterNodes) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
PlanContext(ParamWriter writer) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
setTargetNodes(ArrayList< String > nodes)
com.vertica.sdk.NodeSpecifyingPlanContext
72 - com.vertica.sdk.NoopTypeCoercion Class Reference
Inheritance diagram for com.vertica.sdk.NoopTypeCoercion:
Collaboration diagram for com.vertica.sdk.NoopTypeCoercion:
Public Member Functions
ByteBuffer
asBinaryBytes (Object value, int length, VerticaType type)
Boolean
asBoolean (Object value, VerticaType type)
ByteBuffer
asCharBytes (Object value, int length, VerticaType type)
java.sql.Date
asDate (Object value, VerticaType type)
Double
asDouble (Object value, VerticaType type)
Long
asLong (Object value, VerticaType type)
java.sql.Timestamp
asTimestamp (Object value, VerticaType type)
Iterator< Object >
getListIterator (Object value)
Iterator< Map.Entry< String, Object > >
getMapIterator (Object value)
MetaType
getMetaType (Object value)
Set< TypeCoercionPolicy >
getPolicy ()
void
setPolicy (Collection< TypeCoercionPolicy > policy)
Protected Member Functions
Collection< TypeCoercionPolicy >
getDefaultPolicy ()
void
invalidInputType (Object value, VerticaType type)
void
unsupportedType (Object value, VerticaType type)
void
valueTooLarge (Object value, VerticaType type)
Detailed Description
NoopTypeCoercion implements no type conversions, but passes already-valid types to the destination. Values may be truncated if the policy includes TRUNCATE_VALUES .
The default policy favors errors and avoids modifying data. See getDefaultPolicy() .
Member Function Documentation
◆ asBinaryBytes()
ByteBuffer com.vertica.sdk.NoopTypeCoercion.asBinaryBytes(Object value, int length, VerticaType type)
Generates a ByteBuffer (or null) value out of a sequence of bytes. Acceptable input types are byte array and ByteBuffer. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
In agreement with how 'binary' values are stored in Vertica, values smaller than the target length are right-extended to length with the zero byte.
The value will be truncated to length when necessary if TRUNCATE_VALUES is specified in the policy. Otherwise values that are too long are treated as invalid input values (see FAIL_INVALID_INPUT_VALUE ).
See also
VerticaType::isBinary()
Implements com.vertica.sdk.TypeCoercion .
◆ asBoolean()
Boolean com.vertica.sdk.NoopTypeCoercion.asBoolean(Object value, VerticaType type)
Generates a Boolean (or null) value out of null objects or Boolean type objects. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
Implements com.vertica.sdk.TypeCoercion .
◆ asCharBytes()
ByteBuffer com.vertica.sdk.NoopTypeCoercion.asCharBytes(Object value, int length, VerticaType type)
Generates a ByteBuffer (or null) value out of null objects or String type objects. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
The bytes will not include trailing spaces if the type is 'char'.
The value will be truncated to length when necessary if TRUNCATE_VALUES is specified in the policy. Otherwise values that are too long are treated as invalid input values (see FAIL_INVALID_INPUT_VALUE ).
See also
VerticaType::isChar()
Implements com.vertica.sdk.TypeCoercion .
◆ asDate()
java.sql.Date com.vertica.sdk.NoopTypeCoercion.asDate(Object value, VerticaType type)
Generate a java.sql.Date (or null) value out of values that are either null, java.sql.Date, or java.util.Date (which includes java.sql.Timestamp and java.sql.Time types).
Note that this is an exception to the general principle of NoopTypeCoercion : some coercion may actually take place here. This is because java.util.Date is so closely related to the java.sql.Date type and much more prevalent.
Implements com.vertica.sdk.TypeCoercion .
◆ asDouble()
Double com.vertica.sdk.NoopTypeCoercion.asDouble(Object value, VerticaType type)
Generates a Double (or null) value out of null objects or Double type objects. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
Implements com.vertica.sdk.TypeCoercion .
◆ asLong()
Long com.vertica.sdk.NoopTypeCoercion.asLong(Object value, VerticaType type)
Generates a Long (or null) value out of null objects or Long type objects. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
Implements com.vertica.sdk.TypeCoercion .
◆ asTimestamp()
java.sql.Timestamp com.vertica.sdk.NoopTypeCoercion.asTimestamp(Object value, VerticaType type)
Generate a java.sql.Timestamp (or null) value out of values that are either null, java.sql.Timestamp, or java.util.Date (which includes java.sql.Date and java.sql.Time types).
Note that this is an exception to the general principle of NoopTypeCoercion ; some coercion may actually take place here. This is because java.util.Date is so closely related to the java.sql.Timestamp type and much more prevalent.
Implements com.vertica.sdk.TypeCoercion .
◆ getDefaultPolicy()
Collection<TypeCoercionPolicy> com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy()
protected
Provides the default policy installed by the constructor.
For NoopTypeCoercion , the default policy favors errors and avoids modifying data:
◆ getListIterator()
Iterator<Object> com.vertica.sdk.NoopTypeCoercion.getListIterator(Object value)
Provides an Iterator over Objects for a given Iterable input.
Parameters
value: Something implementing Iterable
Implements com.vertica.sdk.TypeCoercion .
◆ getMapIterator()
Iterator<Map.Entry<String,Object> > com.vertica.sdk.NoopTypeCoercion.getMapIterator(Object value)
Provides an Iterator over map entries for a given Map.
Internal maps are assumed to have String keys. A ClassCastException will eventually result if there are internal maps with keys that are not Strings.
Parameters
value: Something implementing Map<String,Object>
Implements com.vertica.sdk.TypeCoercion .
MetaType com.vertica.sdk.NoopTypeCoercion.getMetaType(Object value)
Detects Java standard Map and Iterable types.
Internal maps are assumed to have String keys. A ClassCastException will result if there are internal maps with keys that are not Strings.
Implements com.vertica.sdk.TypeCoercion .
◆ getPolicy()
Set<TypeCoercionPolicy> com.vertica.sdk.NullTypeCoercion.getPolicy()
inherited
Returns an unmodifiable version of the policy.
Returns
The policy collection.
See also
setPolicy
Implements com.vertica.sdk.TypeCoercion .
Referenced by
void com.vertica.sdk.NoopTypeCoercion.invalidInputType(Object value, VerticaType type)
protected
Throws a TypeCoercionException if the policy includes FAIL_INVALID_INPUT_TYPE . Otherwise does nothing.
Parameters
value: The value being coerced.
type: The target type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
◆ setPolicy()
void com.vertica.sdk.NullTypeCoercion.setPolicy(Collection< TypeCoercionPolicy > policy)
inherited
Sets the policies for this TypeCoercion instance. Policies generally dictate which scenarios generate exceptions and allow for different error handling choices without implementing a new TypeCoercion class.
Parameters
policy: The policy collection
See also
TypeCoercionPolicy
getPolicy()
Implements com.vertica.sdk.TypeCoercion .
Referenced by com.vertica.sdk.NullTypeCoercion.NullTypeCoercion() .
◆ unsupportedType()
void com.vertica.sdk.NullTypeCoercion.unsupportedType(Object value, VerticaType type)
protected inherited
Throws a TypeCoercionException if the policy includes TypeCoercionPolicy#FAIL_UNSUPPORTED_TYPE . Otherwise does nothing.
Parameters
value: The value provided which could not be coerced.
type: The target Vertica type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
void com.vertica.sdk.NoopTypeCoercion.valueTooLarge(Object value, VerticaType type)
protected
Throws a TypeCoercionException with a TRUNCATE_VALUES cause if the policy includes FAIL_INVALID_INPUT_VALUE . Otherwise does nothing.
This should only be called if the policy does not request truncation via TRUNCATE_VALUES .
Parameters
value: The value being coerced.
type: The target type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
73 - com.vertica.sdk.NoopTypeCoercion Member List
This is the complete list of members for com.vertica.sdk.NoopTypeCoercion , including all inherited members.
asBinaryBytes(Object value, int length, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asBoolean(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asCharBytes(Object value, int length, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asDate(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asDouble(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asLong(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asTimestamp(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
getDefaultPolicy()
com.vertica.sdk.NoopTypeCoercion
protected
getListIterator(Object value)
com.vertica.sdk.NoopTypeCoercion
getMapIterator(Object value)
com.vertica.sdk.NoopTypeCoercion
getMetaType(Object value)
com.vertica.sdk.NoopTypeCoercion
getPolicy()
com.vertica.sdk.NullTypeCoercion
invalidInputType(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
protected
NullTypeCoercion()
com.vertica.sdk.NullTypeCoercion
setPolicy(Collection< TypeCoercionPolicy > policy)
com.vertica.sdk.NullTypeCoercion
unsupportedType(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
protected
valueTooLarge(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
protected
74 - com.vertica.sdk.NullTypeCoercion Class Reference
Inheritance diagram for com.vertica.sdk.NullTypeCoercion:
Collaboration diagram for com.vertica.sdk.NullTypeCoercion:
Public Member Functions
NullTypeCoercion ()
ByteBuffer
asBinaryBytes (Object value, int length, VerticaType type)
Boolean
asBoolean (Object value, VerticaType type)
ByteBuffer
asCharBytes (Object value, int length, VerticaType type)
java.sql.Date
asDate (Object value, VerticaType type)
Double
asDouble (Object value, VerticaType type)
Long
asLong (Object value, VerticaType type)
java.sql.Timestamp
asTimestamp (Object value, VerticaType type)
Iterator< Object >
getListIterator (Object value)
Iterator< Map.Entry< String, Object > >
getMapIterator (Object value)
MetaType
getMetaType (Object value)
Set< TypeCoercionPolicy >
getPolicy ()
void
setPolicy (Collection< TypeCoercionPolicy > policy)
Protected Member Functions
Collection< TypeCoercionPolicy >
getDefaultPolicy ()
void
unsupportedType (Object value, VerticaType type)
Detailed Description
An implementation of TypeCoercion that always returns null. By default, it has an empty policy, causing all attempts to return null without raising any exceptions under any circumstances.
If FAIL_UNSUPPORTED_TYPE is added to the policy, all coercions will raise exceptions.
This is a good choice for a superclass for users implementing their own type coercion and not interesting in using any standard type coercion. In that case, use of FAIL_UNSUPPORTED_TYPE is recommended to identify gaps in support. For a more functional starting point, see NoopTypeCoercion .
Constructor & Destructor Documentation
◆ NullTypeCoercion()
com.vertica.sdk.NullTypeCoercion.NullTypeCoercion()
Constructor. Initializes this TypeCoercion with an empty policy.
See also
getDefaultPolicy()
Member Function Documentation
◆ asBinaryBytes()
ByteBuffer com.vertica.sdk.NullTypeCoercion.asBinaryBytes(Object value, int length, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asBoolean()
Boolean com.vertica.sdk.NullTypeCoercion.asBoolean(Object value, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asCharBytes()
ByteBuffer com.vertica.sdk.NullTypeCoercion.asCharBytes(Object value, int length, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asDate()
java.sql.Date com.vertica.sdk.NullTypeCoercion.asDate(Object value, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asDouble()
Double com.vertica.sdk.NullTypeCoercion.asDouble(Object value, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asLong()
Long com.vertica.sdk.NullTypeCoercion.asLong(Object value, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ asTimestamp()
java.sql.Timestamp com.vertica.sdk.NullTypeCoercion.asTimestamp(Object value, VerticaType type)
Not supported; returns null or raises TypeCoercionException .
Implements com.vertica.sdk.TypeCoercion .
◆ getDefaultPolicy()
Collection<TypeCoercionPolicy> com.vertica.sdk.NullTypeCoercion.getDefaultPolicy()
protected
Provides the default policy installed by the constructor.
For NullTypeCoercion , this policy is empty.
Returns
A new collection of the default policy for this instance of TypeCoercion .
See also
getPolicy()
#setPolicy(Collection)
Referenced by com.vertica.sdk.NullTypeCoercion.NullTypeCoercion() .
◆ getListIterator()
Iterator<Object> com.vertica.sdk.NullTypeCoercion.getListIterator(Object value)
Not implemented on NullTypeCoercion . Throws UnsupportedOperationException.
Implements com.vertica.sdk.TypeCoercion .
◆ getMapIterator()
Iterator<Map.Entry<String,Object> > com.vertica.sdk.NullTypeCoercion.getMapIterator(Object value)
Not implemented on NullTypeCoercion . Throws UnsupportedOperationException.
Implements com.vertica.sdk.TypeCoercion .
MetaType com.vertica.sdk.NullTypeCoercion.getMetaType(Object value)
Always returns SCALAR since this TypeCoercion doesn't know how to convert anything to LIST or MAP types.
Implements com.vertica.sdk.TypeCoercion .
◆ getPolicy()
Set<TypeCoercionPolicy> com.vertica.sdk.NullTypeCoercion.getPolicy()
Returns an unmodifiable version of the policy.
Returns
The policy collection.
See also
setPolicy
Implements com.vertica.sdk.TypeCoercion .
Referenced by
◆ setPolicy()
void com.vertica.sdk.NullTypeCoercion.setPolicy(Collection< TypeCoercionPolicy > policy)
Sets the policies for this TypeCoercion instance. Policies generally dictate which scenarios generate exceptions and allow for different error handling choices without implementing a new TypeCoercion class.
Parameters
policy: The policy collection
See also
TypeCoercionPolicy
getPolicy()
Implements com.vertica.sdk.TypeCoercion .
Referenced by com.vertica.sdk.NullTypeCoercion.NullTypeCoercion() .
◆ unsupportedType()
void com.vertica.sdk.NullTypeCoercion.unsupportedType(Object value, VerticaType type)
protected
Throws a TypeCoercionException if the policy includes TypeCoercionPolicy#FAIL_UNSUPPORTED_TYPE . Otherwise does nothing.
Parameters
value: The value provided which could not be coerced.
type: The target Vertica type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
75 - com.vertica.sdk.NullTypeCoercion Member List
This is the complete list of members for com.vertica.sdk.NullTypeCoercion , including all inherited members.
asBinaryBytes(Object value, int length, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asBoolean(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asCharBytes(Object value, int length, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asDate(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asDouble(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asLong(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
asTimestamp(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
getDefaultPolicy()
com.vertica.sdk.NullTypeCoercion
protected
getListIterator(Object value)
com.vertica.sdk.NullTypeCoercion
getMapIterator(Object value)
com.vertica.sdk.NullTypeCoercion
getMetaType(Object value)
com.vertica.sdk.NullTypeCoercion
getPolicy()
com.vertica.sdk.NullTypeCoercion
NullTypeCoercion()
com.vertica.sdk.NullTypeCoercion
setPolicy(Collection< TypeCoercionPolicy > policy)
com.vertica.sdk.NullTypeCoercion
unsupportedType(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
protected
76 - com.vertica.sdk.ParamReader Class Reference
Inheritance diagram for com.vertica.sdk.ParamReader:
Collaboration diagram for com.vertica.sdk.ParamReader:
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
containsParameter (String paramName)
boolean
getBoolean (int idx)
boolean
getBoolean (String paramName) throws UdfException
ByteBuffer
getColDataAreaRef (int idx)
ByteBuffer
getColRef (int idx)
java.sql.Date
getDate (String paramName) throws UdfException
java.sql.Date
getDate (int idx)
double
getDouble (int idx)
double
getDouble (String paramName) throws UdfException
int
getIndex (String paramName) throws UdfException
long
getLong (int idx)
long
getLong (String paramName) throws UdfException
int
getNumCols ()
int
getNumRows ()
ArrayList< String >
getParamNames ()
BaseDataOID
getProcessBlockUserInfoVectorAt (int i)
String
getString (String paramName) throws UdfException
String
getString (int idx)
int
getStringLength (String paramName) throws UdfException
int
getStringLength (int idx)
int
getStringLoc (int idx)
java.sql.Timestamp
getTimestamp (String paramName) throws UdfException
java.sql.Timestamp
getTimestamp (int idx)
VerticaType
getType (String paramName) throws UdfException
SizedColumnTypes
getTypeMetaData ()
VNumeric
getVNumeric (String paramName) throws UdfException
VNumeric
getVNumeric (int idx)
VString
getVString (String paramName) throws UdfException
VString
getVString (int idx)
boolean
isBooleanNull (int idx)
boolean
isBooleanNull (String paramName) throws UdfException
boolean
isDateNull (String paramName) throws UdfException
boolean
isDateNull (int idx)
boolean
isDoubleNull (int idx)
boolean
isDoubleNull (String paramName) throws UdfException
boolean
isEmpty ()
boolean
isLongNull (int idx)
boolean
isLongNull (String paramName) throws UdfException
boolean
isStringNull (String paramName) throws UdfException
boolean
isStringNull (int idx)
boolean
isTimestampInfinite (String paramName) throws UdfException
boolean
isTimestampInfinite (int idx)
boolean
isTimestampInfiniteNeg (String paramName) throws UdfException
boolean
isTimestampInfiniteNeg (int idx)
boolean
isTimestampInfinitePos (String paramName) throws UdfException
boolean
isTimestampInfinitePos (int idx)
boolean
isTimestampNull (String paramName) throws UdfException
boolean
isTimestampNull (int idx)
boolean
next () throws UdfException, DestroyInvocation
void
resetBuffers ()
Public Attributes
int
count
int
index
int
ncols
int
nrows
HashMap< String, Integer >
paramNameToIndex
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
Provides read access to a set of named parameters. This class provides type-specific methods to retrieve values.
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
◆ containsParameter()
boolean com.vertica.sdk.ParamReader.containsParameter(String paramName)
Function to see if the ParamReader has a value for the parameter
Parameters
paramName: parameter name to check
Returns
true if it does
◆ getBoolean()
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.
◆ 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
◆ getDate()
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.
◆ getDouble()
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.
◆ 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
◆ getLong()
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
◆ 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.
◆ getParamNames()
ArrayList<String> com.vertica.sdk.ParamReader.getParamNames()
Returns
all names of parameters stored in this ParamReader
◆ getString()
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.
◆ getStringLength()
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
◆ getStringLoc()
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() .
◆ getTimestamp()
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'.
◆ getType()
VerticaType com.vertica.sdk.ParamReader.getType(String paramName) throws UdfException
Parameters
paramName: parameter name
Returns
the type of the given parameter
Exceptions
UdfException: UDF problem
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ getVNumeric()
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.
◆ getVString()
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() .
◆ isBooleanNull()
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.
◆ isDateNull()
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() .
◆ isDoubleNull()
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.
◆ isEmpty()
boolean com.vertica.sdk.ParamReader.isEmpty()
Returns
true if there are no parameters
◆ isLongNull()
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
◆ isStringNull()
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() .
◆ isTimestampInfinite()
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() .
◆ isTimestampInfiniteNeg()
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() .
◆ isTimestampInfinitePos()
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() .
◆ isTimestampNull()
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() .
◆ next()
boolean com.vertica.sdk.BlockReader.next() throws UdfException, DestroyInvocation
inherited
Advance to the next record.
Returns
true if there are more rows to read, false otherwise.
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
77 - com.vertica.sdk.ParamReader Member List
This is the complete list of members for com.vertica.sdk.ParamReader , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
containsParameter(String paramName)
com.vertica.sdk.ParamReader
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getBoolean(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDouble(int idx)
com.vertica.sdk.BlockReader
getIndex(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getParamNames()
com.vertica.sdk.ParamReader
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getTimestamp(int idx)
com.vertica.sdk.BlockReader
getType(String paramName)
com.vertica.sdk.ParamReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isEmpty()
com.vertica.sdk.ParamReader
isLongNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isLongNull(int idx)
com.vertica.sdk.BlockReader
isStringNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next()
com.vertica.sdk.BlockReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
paramNameToIndex (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
ParamReader() (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
78 - com.vertica.sdk.ParamWriter Class Reference
Inheritance diagram for com.vertica.sdk.ParamWriter:
Collaboration diagram for com.vertica.sdk.ParamWriter:
Public Member Functions
ParamWriter (ParamReader params)
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
clearParameter (String fieldName)
boolean
containsParameter (String paramName)
boolean
getBoolean (int idx)
boolean
getBoolean (String paramName) throws UdfException
ByteBuffer
getColDataAreaRef (int idx)
ByteBuffer
getColRef (int idx)
java.sql.Date
getDate (String paramName) throws UdfException
java.sql.Date
getDate (int idx)
double
getDouble (int idx)
double
getDouble (String paramName) throws UdfException
int
getIndex (String paramName) throws UdfException
long
getLong (int idx)
long
getLong (String paramName) throws UdfException
int
getNumCols ()
int
getNumRows ()
ArrayList< String >
getParamNames ()
BaseDataOID
getProcessBlockUserInfoVectorAt (int i)
String
getString (String paramName) throws UdfException
String
getString (int idx)
int
getStringLength (String paramName) throws UdfException
int
getStringLength (int idx)
int
getStringLoc (int idx)
java.sql.Timestamp
getTimestamp (String paramName) throws UdfException
java.sql.Timestamp
getTimestamp (int idx)
VerticaType
getType (String paramName) throws UdfException
SizedColumnTypes
getTypeMetaData ()
VNumeric
getVNumeric (String paramName) throws UdfException
VNumeric
getVNumeric (int idx)
VString
getVString (String paramName) throws UdfException
VString
getVString (int idx)
boolean
isBooleanNull (int idx)
boolean
isBooleanNull (String paramName) throws UdfException
boolean
isDateNull (String paramName) throws UdfException
boolean
isDateNull (int idx)
boolean
isDoubleNull (int idx)
boolean
isDoubleNull (String paramName) throws UdfException
boolean
isEmpty ()
boolean
isLongNull (int idx)
boolean
isLongNull (String paramName) throws UdfException
boolean
isStringNull (String paramName) throws UdfException
boolean
isStringNull (int idx)
boolean
isTimestampInfinite (String paramName) throws UdfException
boolean
isTimestampInfinite (int idx)
boolean
isTimestampInfiniteNeg (String paramName) throws UdfException
boolean
isTimestampInfiniteNeg (int idx)
boolean
isTimestampInfinitePos (String paramName) throws UdfException
boolean
isTimestampInfinitePos (int idx)
boolean
isTimestampNull (String paramName) throws UdfException
boolean
isTimestampNull (int idx)
boolean
next () throws UdfException, DestroyInvocation
void
resetBuffers ()
void
setBool (String fieldName, boolean r) throws UdfException
Adds a BOOLEAN value to the output row.
void
setDate (String fieldName, java.sql.Date r) throws UdfException
Adds a DATE value to the output row.
void
setDouble (String fieldName, double r) throws UdfException
Adds a FLOAT value to the output row.
void
setLong (String fieldName, Long r) throws UdfException
Adds a LONG INTEGER value to the output row.
void
setLongString (String fieldName, String r) throws UdfException
Adds a Long String value to the output row.
void
setNumeric (String fieldName, BigDecimal bd)
Allocate a new VNumeric object to use as output.
void
setString (String fieldName, String r) throws UdfException
Adds a String value to the output row.
void
setTimestamp (String fieldName, java.sql.Timestamp r) throws UdfException
Adds a TIMESTAMP value to the output row.
void
setTimestampInfiniteNeg (String fieldName) throws UdfException
void
setTimestampInfinitePos (String fieldName) throws UdfException
Public Attributes
int
count
int
index
int
ncols
int
nrows
HashMap< String, Integer >
paramNameToIndex
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
Provides write access to a set of named parameters. This class extends ParamReader to add type-specific methods to write values.
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
◆ containsParameter()
boolean com.vertica.sdk.ParamReader.containsParameter(String paramName)
inherited
Function to see if the ParamReader has a value for the parameter
Parameters
paramName: parameter name to check
Returns
true if it does
◆ getBoolean()
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.
◆ 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
◆ getDate()
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.
◆ getDouble()
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.
◆ 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
◆ getLong()
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
◆ 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.
◆ getParamNames()
ArrayList<String> com.vertica.sdk.ParamReader.getParamNames()
inherited
Returns
all names of parameters stored in this ParamReader
◆ getString()
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.
◆ getStringLength()
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
◆ getStringLoc()
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() .
◆ getTimestamp()
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'.
◆ getType()
VerticaType com.vertica.sdk.ParamReader.getType(String paramName) throws UdfException
inherited
Parameters
paramName: parameter name
Returns
the type of the given parameter
Exceptions
UdfException: UDF problem
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ getVNumeric()
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.
◆ getVString()
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() .
◆ isBooleanNull()
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.
◆ isDateNull()
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() .
◆ isDoubleNull()
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.
◆ isEmpty()
boolean com.vertica.sdk.ParamReader.isEmpty()
inherited
Returns
true if there are no parameters
◆ isLongNull()
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
◆ isStringNull()
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() .
◆ isTimestampInfinite()
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() .
◆ isTimestampInfiniteNeg()
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() .
◆ isTimestampInfinitePos()
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() .
◆ isTimestampNull()
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() .
◆ next()
boolean com.vertica.sdk.BlockReader.next() throws UdfException, DestroyInvocation
inherited
Advance to the next record.
Returns
true if there are more rows to read, false otherwise.
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
◆ setBool()
void com.vertica.sdk.ParamWriter.setBool(String fieldName, boolean r) throws UdfException
Adds a BOOLEAN value to the output row.
Parameters
r: The BOOLEAN value to insert into the output row.
◆ setDate()
void com.vertica.sdk.ParamWriter.setDate(String fieldName, java.sql.Date r) throws UdfException
Adds a DATE value to the output row.
Parameters
r: The DATE value to insert into the output row.
◆ setDouble()
void com.vertica.sdk.ParamWriter.setDouble(String fieldName, double r) throws UdfException
Adds a FLOAT value to the output row.
Parameters
r: The FLOAT value to insert into the output row.
◆ setLong()
void com.vertica.sdk.ParamWriter.setLong(String fieldName, Long r) throws UdfException
Adds a LONG INTEGER value to the output row.
Parameters
r: The LONG INTEGER value to insert into the output row.
Referenced by
◆ setLongString()
void com.vertica.sdk.ParamWriter.setLongString(String fieldName, String r) throws UdfException
Adds a Long String value to the output row.
Parameters
r: The Long String value to insert into the output row.
◆ setNumeric()
void com.vertica.sdk.ParamWriter.setNumeric(String fieldName, 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.ParamWriter.setString(String fieldName, String r) throws UdfException
Adds a String value to the output row.
Parameters
r: The String value to insert into the output row.
◆ setTimestamp()
void com.vertica.sdk.ParamWriter.setTimestamp(String fieldName, java.sql.Timestamp r) throws UdfException
Adds a TIMESTAMP value to the output row.
Parameters
r: The TIMESTAMP value to insert into the output row.
79 - com.vertica.sdk.ParamWriter Member List
This is the complete list of members for com.vertica.sdk.ParamWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
clearParameter(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
containsParameter(String paramName)
com.vertica.sdk.ParamReader
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getBoolean(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getDouble(int idx)
com.vertica.sdk.BlockReader
getIndex(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getParamNames()
com.vertica.sdk.ParamReader
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getTimestamp(int idx)
com.vertica.sdk.BlockReader
getType(String paramName)
com.vertica.sdk.ParamReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isEmpty()
com.vertica.sdk.ParamReader
isLongNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isLongNull(int idx)
com.vertica.sdk.BlockReader
isStringNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(String paramName) (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
com::vertica::sdk::BlockReader.isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next()
com.vertica.sdk.BlockReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
paramNameToIndex (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
ParamReader() (defined in com.vertica.sdk.ParamReader)
com.vertica.sdk.ParamReader
ParamWriter() (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
ParamWriter(ParamReader params) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBool(String fieldName, boolean r)
com.vertica.sdk.ParamWriter
setDate(String fieldName, java.sql.Date r)
com.vertica.sdk.ParamWriter
setDouble(String fieldName, double r)
com.vertica.sdk.ParamWriter
setLong(String fieldName, Long r)
com.vertica.sdk.ParamWriter
setLongString(String fieldName, String r)
com.vertica.sdk.ParamWriter
setNumeric(String fieldName, BigDecimal bd)
com.vertica.sdk.ParamWriter
setString(String fieldName, String r)
com.vertica.sdk.ParamWriter
setTimestamp(String fieldName, java.sql.Timestamp r)
com.vertica.sdk.ParamWriter
setTimestampInfiniteNeg(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
setTimestampInfinitePos(String fieldName) (defined in com.vertica.sdk.ParamWriter)
com.vertica.sdk.ParamWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
80 - com.vertica.sdk.ParserFactory Class Reference
Inheritance diagram for com.vertica.sdk.ParserFactory:
Collaboration diagram for com.vertica.sdk.ParserFactory:
Public Member Functions
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getParserReturnType (ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
UDXType
getUDXFactoryType ()
void
plan (ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt) throws UdfException
abstract UDParser
prepare (ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes returnType) throws UdfException
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Produces and initializes UDParsers to parse input into tuples.
Note that ParserFactories are singletons. Subclasses should be stateless, with no fields containing data, just methods. plan() and prepare() methods must never modify any global variables or state; they may only modify the variables that they are given as arguments.
Member Function Documentation
◆ getParameterType()
void com.vertica.sdk.ParserFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
Inherited from the parent "UDXFactory" class in VerticaUDx.h
◆ getParserReturnType()
void com.vertica.sdk.ParserFactory.getParserReturnType(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
Function to tell Vertica what the return types (and length/precision if necessary) of this UDX are. Called, possibly multiple times, on each node executing the query.
The default provided implementation configures Vertica to use the same output column types as the destination table. This requires that the UDParser validate the expected output column types and emit appropriate tuples.
Note that the default provided implementation of this function should be sufficient for most Parsers, so this method should not be overridden by most Parser implementations.
If a COPY statement has a return type that doesn't match the destination table, Vertica will emit an appropriate error. Users can use COPY expressions to perform typecasting and conversion if necessary.
For CHAR/VARCHAR types, specify the max length,
For Time/Timestamp types (with or without time zone), specify the precision, -1 means unspecified/don't care
For all other types, no length/precision specification needed
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
perColumnParamReader: Per-column parameters passed into the query
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
argTypes: Provides the data types of arguments that this UDT was called with. This may be used to modify the return types accordingly.
returnType: User code must fill in the names and data types returned by the UDT.
Exceptions
UdfException: UDF problem
◆ getPerInstanceResources()
void com.vertica.sdk.UDLFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
void com.vertica.sdk.UDLFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
inherited
Provides the argument and return types of the UDL. UDL's take no input tuples; as such, their prototype is empty.
◆ getReturnType()
void com.vertica.sdk.UDLFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
inherited
Not used in this form
◆ plan()
void com.vertica.sdk.ParserFactory.plan(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt) throws UdfException
Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on (through srvInterface).
plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare() .
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
perColumnParamReader: Per-column parameters passed into the query
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
Exceptions
UdfException: UDF problem
◆ prepare()
abstract UDParser com.vertica.sdk.ParserFactory.prepare(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes returnType) throws UdfException
abstract
Instantiate a UDParser instance. This function will be called on each node, prior to the Load operator starting to execute.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
perColumnParamReader: Per-column parameters passed into the query
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan().
returnType: The data types of the columns that this Parser must produce
Returns
The UDParser instance to be used by this query
Exceptions
UdfException: UDF problem
81 - com.vertica.sdk.ParserFactory Member List
This is the complete list of members for com.vertica.sdk.ParserFactory , including all inherited members.
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.ParserFactory
getParserReturnType(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.ParserFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res) (defined in com.vertica.sdk.UDLFactory)
com.vertica.sdk.UDLFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDLFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDLFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDLFactory
getUDXFactoryType() (defined in com.vertica.sdk.ParserFactory)
com.vertica.sdk.ParserFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
plan(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt)
com.vertica.sdk.ParserFactory
prepare(ServerInterface srvInterface, PerColumnParamReader perColumnParamReader, PlanContext planCtxt, SizedColumnTypes returnType)
com.vertica.sdk.ParserFactory
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
82 - 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< ByteBuffer >
coldataareas
ArrayList< ByteBuffer >
cols
ArrayList< Integer >
colstrides
ArrayList< Integer >
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
◆ 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
◆ getBoolean()
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.
◆ 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
◆ getDate()
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.
◆ getDouble()
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.
◆ 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
◆ getLong()
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
◆ 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.
◆ getString()
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.
◆ getStringLength()
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
◆ getStringLoc()
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() .
◆ getTimestamp()
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
◆ getVNumeric()
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.
◆ getVString()
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() .
◆ isBooleanNull()
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.
◆ isDateNull()
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() .
◆ isDoubleNull()
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.
◆ isLongNull()
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
◆ isStringNull()
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() .
◆ isTimestampInfinite()
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() .
◆ isTimestampInfiniteNeg()
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() .
◆ isTimestampInfinitePos()
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() .
◆ isTimestampNull()
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() .
◆ readNextBlock()
abstract boolean com.vertica.sdk.PartitionReader.readNextBlock() throws UdfException, DestroyInvocation
abstract
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
83 - com.vertica.sdk.PartitionReader Member List
This is the complete list of members for com.vertica.sdk.PartitionReader , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
BlockReader() (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
BlockReader(int _ncols, int _rowcount) (defined in com.vertica.sdk.BlockReader)
com.vertica.sdk.BlockReader
protected
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getBoolean(int idx)
com.vertica.sdk.BlockReader
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDate(int idx)
com.vertica.sdk.BlockReader
getDouble(int idx)
com.vertica.sdk.BlockReader
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getLong(int idx)
com.vertica.sdk.BlockReader
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getString(int idx)
com.vertica.sdk.BlockReader
getStringLength(int idx)
com.vertica.sdk.BlockReader
getStringLoc(int idx)
com.vertica.sdk.BlockReader
getTimestamp(int idx)
com.vertica.sdk.BlockReader
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getVNumeric(int idx)
com.vertica.sdk.BlockReader
getVString(int idx)
com.vertica.sdk.BlockReader
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
isBooleanNull(int idx)
com.vertica.sdk.BlockReader
isDateNull(int idx)
com.vertica.sdk.BlockReader
isDoubleNull(int idx)
com.vertica.sdk.BlockReader
isLongNull(int idx)
com.vertica.sdk.BlockReader
isStringNull(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinite(int idx)
com.vertica.sdk.BlockReader
isTimestampInfiniteNeg(int idx)
com.vertica.sdk.BlockReader
isTimestampInfinitePos(int idx)
com.vertica.sdk.BlockReader
isTimestampNull(int idx)
com.vertica.sdk.BlockReader
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next() (defined in com.vertica.sdk.PartitionReader)
com.vertica.sdk.PartitionReader
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
PartitionReader() (defined in com.vertica.sdk.PartitionReader)
com.vertica.sdk.PartitionReader
readNextBlock()
com.vertica.sdk.PartitionReader
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
84 - com.vertica.sdk.PartitionWriter Class Reference
Inheritance diagram for com.vertica.sdk.PartitionWriter:
Collaboration diagram for com.vertica.sdk.PartitionWriter:
Public Member Functions
PartitionWriter (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
Detailed Description
PartitionWriter provides an iterator-based write interface over output data for a single partition. Automatically makes space a block-at-a-time, as needed.
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
void com.vertica.sdk.PartitionWriter.copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx) throws UdfException
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.
Parameters
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)
◆ 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
◆ getDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.getDefaultTypeCoercion()
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 .
See also
#setRowFromMap(Map)
Returns
the current default TypeCoercion , creating one if necessary.
Referenced by
◆ 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.
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ getWriteableBlock()
abstract boolean com.vertica.sdk.PartitionWriter.getWriteableBlock() throws UdfException, DestroyInvocation
abstract
Gets a writeable block of data and positions cursor at the beginning.
Returns
true on success; use other methods to manipulate the block
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
◆ setBooleanValue()
void com.vertica.sdk.PartitionWriter.setBooleanValue(int idx, Boolean value)
Set a Boolean value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDateValue()
void com.vertica.sdk.PartitionWriter.setDateValue(int idx, java.sql.Date value)
Set a Date value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.setDefaultTypeCoercion(TypeCoercion coerce)
Set the default type coercion instance.
See also
#setRowFromMap(Map)
Parameters
coerce: A TypeCoercion instance.
Returns
the former default, which may be null.
◆ setDoubleValue()
void com.vertica.sdk.PartitionWriter.setDoubleValue(int idx, Double value)
Set a Double value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setLongValue()
void com.vertica.sdk.PartitionWriter.setLongValue(int idx, Long value)
Set a Long value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setNumericValue()
void com.vertica.sdk.PartitionWriter.setNumericValue(int idx, BigDecimal value)
Set a Numeric value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setRowFromMap() [1/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData)
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.
Parameters
rowData: The data. Null data is treated as empty.
See also
#setRowFromMap(Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setRowFromMap() [2/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
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).
Parameters
rowData: The data. Null data is treated as empty.
coerce: The implementation of coercion
See also
#setVMap(int, Map, TypeCoercion)
setValue(int, Object, TypeCoercion)
◆ setStringBytes()
void com.vertica.sdk.PartitionWriter.setStringBytes(int idx, ByteBuffer bytes)
Set a String value for column at index idx. Accepts null values.
Parameters
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.
Exceptions
IllegalArgumentException: if bytes is too long
◆ setStringValue()
void com.vertica.sdk.PartitionWriter.setStringValue(int idx, String value)
Set a String value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setTimestampValue()
void com.vertica.sdk.PartitionWriter.setTimestampValue(int idx, java.sql.Timestamp value)
Set a Timestamp value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setValue()
void com.vertica.sdk.PartitionWriter.setValue(int idx, Object value, TypeCoercion coerce)
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.
Bools
Integers (excluding Numeric)
Floats
String-like types (char and binary, along with var- and long variants)
Timestamp and timestamptz
Dates
Parameters
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() .
◆ setVMap() [1/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data)
Encodes a VMap into the given column, which must be of binary type.
Parameters
idx: The index of the binary or varbinary column.
data: The data. Null data is treated as empty.
See also
#setVMap(int, Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setVMap() [2/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
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.
Parameters
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.
See also
#setVMap(int, Map)
getDefaultTypeCoercion()
85 - com.vertica.sdk.PartitionWriter Member List
This is the complete list of members for com.vertica.sdk.PartitionWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
blockSizeGivenRowSize(long row_size) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protectedstatic
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx)
com.vertica.sdk.PartitionWriter
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDefaultTypeCoercion()
com.vertica.sdk.PartitionWriter
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getNumCols()
com.vertica.sdk.VerticaBlock
getNumericWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getRowSize(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
getStringWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getWriteableBlock()
com.vertica.sdk.PartitionWriter
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next() (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
PartitionWriter(int nargs) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBoolean(int idx, boolean r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanValue(int idx, Boolean value)
com.vertica.sdk.PartitionWriter
setDate(int idx, java.sql.Date r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateValue(int idx, java.sql.Date value)
com.vertica.sdk.PartitionWriter
setDefaultTypeCoercion(TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setDouble(int idx, double r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleValue(int idx, Double value)
com.vertica.sdk.PartitionWriter
setLong(int idx, long r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongValue(int idx, Long value)
com.vertica.sdk.PartitionWriter
setNumeric(int idx, BigDecimal bd) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericValue(int idx, BigDecimal value)
com.vertica.sdk.PartitionWriter
setRowCount(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
setRowFromMap(Map< String,?> rowData)
com.vertica.sdk.PartitionWriter
setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setString(int idx, String r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringBytes(int idx, ByteBuffer bytes)
com.vertica.sdk.PartitionWriter
setStringNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringValue(int idx, String value)
com.vertica.sdk.PartitionWriter
setTimestamp(int idx, java.sql.Timestamp r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfiniteNeg(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfinitePos(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampValue(int idx, java.sql.Timestamp value)
com.vertica.sdk.PartitionWriter
setValue(int idx, Object value, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
throwInCorrectUsageError(int idx)
com.vertica.sdk.PartitionWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
86 - com.vertica.sdk.PerColumnParamReader Class Reference
Collaboration diagram for com.vertica.sdk.PerColumnParamReader:
Public Member Functions
boolean
containsColumn (String columnName)
Collection< String >
getColumnNames ()
ParamReader
getColumnParamReader (String column)
Public Attributes
Map< String, ParamReader >
paramReaderByCol
Detailed Description
A wrapper around a map from column to ParamReader .
Member Function Documentation
◆ containsColumn()
boolean com.vertica.sdk.PerColumnParamReader.containsColumn(String columnName)
Parameters
columnName: name of column
Returns
true if a ParamReader exists for the given column
◆ getColumnNames()
Collection<String> com.vertica.sdk.PerColumnParamReader.getColumnNames()
Gets the names of all columns with column specific arguments
Returns
a vector of column names
◆ getColumnParamReader()
ParamReader com.vertica.sdk.PerColumnParamReader.getColumnParamReader(String column)
Gets the parameters of the given column
Parameters
column: the name of the column of interest
Returns
the parameters of the given column
87 - com.vertica.sdk.PerColumnParamReader Member List
This is the complete list of members for com.vertica.sdk.PerColumnParamReader , including all inherited members.
containsColumn(String columnName)
com.vertica.sdk.PerColumnParamReader
getColumnNames()
com.vertica.sdk.PerColumnParamReader
getColumnParamReader(String column)
com.vertica.sdk.PerColumnParamReader
paramReaderByCol (defined in com.vertica.sdk.PerColumnParamReader)
com.vertica.sdk.PerColumnParamReader
PerColumnParamReader() (defined in com.vertica.sdk.PerColumnParamReader)
com.vertica.sdk.PerColumnParamReader
88 - com.vertica.sdk.PGUDxShared Class Reference
Collaboration diagram for com.vertica.sdk.PGUDxShared:
Static Public Member Functions
static long
PRECISIONFROMTYPMOD (long t)
static long
SCALEFROMTYPMOD (long t)
static long
TYPMODFROMPRECSCALE (long p, long s)
Static Public Attributes
static final int
NUMERIC_MAX_PRECISION = 1024
static final int
VARHDRSZ = 4
89 - com.vertica.sdk.PGUDxShared Member List
This is the complete list of members for com.vertica.sdk.PGUDxShared , including all inherited members.
NUMERIC_MAX_PRECISION (defined in com.vertica.sdk.PGUDxShared)
com.vertica.sdk.PGUDxShared
static
PRECISIONFROMTYPMOD(long t) (defined in com.vertica.sdk.PGUDxShared)
com.vertica.sdk.PGUDxShared
static
SCALEFROMTYPMOD(long t) (defined in com.vertica.sdk.PGUDxShared)
com.vertica.sdk.PGUDxShared
static
TYPMODFROMPRECSCALE(long p, long s) (defined in com.vertica.sdk.PGUDxShared)
com.vertica.sdk.PGUDxShared
static
VARHDRSZ (defined in com.vertica.sdk.PGUDxShared)
com.vertica.sdk.PGUDxShared
static
90 - com.vertica.sdk.PlanContext Class Reference
Inheritance diagram for com.vertica.sdk.PlanContext:
Collaboration diagram for com.vertica.sdk.PlanContext:
Public Member Functions
PlanContext (ParamWriter writer, ArrayList< String > clusterNodes)
PlanContext (ParamWriter writer)
ArrayList< String >
getClusterNodes ()
ParamReader
getReader ()
ParamWriter
getWriter ()
Detailed Description
Shared query-plan state, used when different parts of query planning take place on different nodes. For example, if some work is done on the query initiator node and some is done on each node executing the query, this class stores shared state.
Member Function Documentation
◆ getClusterNodes()
ArrayList<String> com.vertica.sdk.PlanContext.getClusterNodes()
Returns
A list of all of the nodes in the current cluster, by node name
Referenced by com.vertica.sdk.NodeSpecifyingPlanContext.setTargetNodes() .
◆ getReader()
ParamReader com.vertica.sdk.PlanContext.getReader()
Returns
A read-only instance of the current context
◆ getWriter()
ParamWriter com.vertica.sdk.PlanContext.getWriter()
Returns
The current context for writing
91 - com.vertica.sdk.PlanContext Member List
This is the complete list of members for com.vertica.sdk.PlanContext , including all inherited members.
getClusterNodes()
com.vertica.sdk.PlanContext
getReader()
com.vertica.sdk.PlanContext
getWriter()
com.vertica.sdk.PlanContext
PlanContext(ParamWriter writer, ArrayList< String > clusterNodes) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
PlanContext(ParamWriter writer) (defined in com.vertica.sdk.PlanContext)
com.vertica.sdk.PlanContext
92 - com.vertica.sdk.Portion Class Reference
Collaboration diagram for com.vertica.sdk.Portion:
Public Member Functions
Portion (long o, long s, boolean t)
boolean
isValid ()
Public Attributes
boolean
is_first_portion
long
offset
long
size
Detailed Description
Portion
Describe a source portion
93 - com.vertica.sdk.Portion Member List
This is the complete list of members for com.vertica.sdk.Portion , including all inherited members.
is_first_portion (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
isValid() (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
offset (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
Portion() (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
Portion(long o, long s, boolean t) (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
size (defined in com.vertica.sdk.Portion)
com.vertica.sdk.Portion
94 - com.vertica.sdk.RejectedRecord Class Reference
Collaboration diagram for com.vertica.sdk.RejectedRecord:
Public Member Functions
RejectedRecord (String reason, char[] data, int length, String terminator)
RejectedRecord (String reason, char[] data, int length)
RejectedRecord (String reason, char[] data)
RejectedRecord (String reason)
Public Attributes
char []
data
int
length
String
reason
String
terminator
Detailed Description
Information about a rejected record.
95 - com.vertica.sdk.RejectedRecord Member List
This is the complete list of members for com.vertica.sdk.RejectedRecord , including all inherited members.
data (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
length (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
reason (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
RejectedRecord(String reason, char[] data, int length, String terminator) (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
RejectedRecord(String reason, char[] data, int length) (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
RejectedRecord(String reason, char[] data) (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
RejectedRecord(String reason) (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
RejectedRecord() (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
terminator (defined in com.vertica.sdk.RejectedRecord)
com.vertica.sdk.RejectedRecord
96 - com.vertica.sdk.ScalarFunction Class Reference
Inheritance diagram for com.vertica.sdk.ScalarFunction:
Collaboration diagram for com.vertica.sdk.ScalarFunction:
Classes
enum
InterfaceType
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
boolean
isCanceled ()
abstract void
processBlock (ServerInterface srvInterface, BlockReader arg_reader, BlockWriter res_writer) throws UdfException, DestroyInvocation
void
setup (ServerInterface srvInterface, SizedColumnTypes argTypes)
Protected Member Functions
void
cancel (ServerInterface srvInterface)
InterfaceType
getInterfaceType ()
Detailed Description
Interface for User-Defined Scalar Function (UDSF). A UDSF produces a single value from a row of data.
A UDSF can be used anywhere a native function can be used, except CREATE TABLE BY PARTITION and SEGMENTED BY expressions.
A ScalarFunction must have an associated ScalarFunctionFactory .
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy() [1/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance destruction. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
Referenced by com.vertica.sdk.UDXFunction.destroy() .
◆ destroy() [2/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
inherited
Perform per instance destruction and write session parameters to be used by UDxs that are invoked after this one returns. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
udSessionParams: a SessionParamWriterMap
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ processBlock()
abstract void com.vertica.sdk.ScalarFunction.processBlock(ServerInterface srvInterface, BlockReader arg_reader, BlockWriter res_writer) throws UdfException, DestroyInvocation
abstract
Invoke a user defined function on a set of rows. As the name suggests, a batch of rows are passed in for every invocation to amortize performance.
Notes:
This methods may be invoked by different threads at different times, and by a different thread than the constructor.
The order in which the function sees rows is not guaranteed.
To report error to Vertica, throw a UdfException object
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
arg_reader: input rows
res_writer: output location
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ setup()
void com.vertica.sdk.UDXFunction.setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance initialization. This function may throw errors.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
97 - com.vertica.sdk.ScalarFunction Member List
This is the complete list of members for com.vertica.sdk.ScalarFunction , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
com.vertica.sdk.UDXFunction
getInterfaceType() (defined in com.vertica.sdk.ScalarFunction)
com.vertica.sdk.ScalarFunction
protected
isCanceled()
com.vertica.sdk.UDXObject
processBlock(ServerInterface srvInterface, BlockReader arg_reader, BlockWriter res_writer)
com.vertica.sdk.ScalarFunction
setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
98 - com.vertica.sdk.ScalarFunction.InterfaceType Enum Reference
Collaboration diagram for com.vertica.sdk.ScalarFunction.InterfaceType:
Public Attributes
FunctionT
IndexListFunctionT
99 - com.vertica.sdk.ScalarFunction.InterfaceType Member List
This is the complete list of members for com.vertica.sdk.ScalarFunction.InterfaceType , including all inherited members.
FunctionT (defined in com.vertica.sdk.ScalarFunction.InterfaceType)
com.vertica.sdk.ScalarFunction.InterfaceType
IndexListFunctionT (defined in com.vertica.sdk.ScalarFunction.InterfaceType)
com.vertica.sdk.ScalarFunction.InterfaceType
100 - com.vertica.sdk.ScalarFunctionFactory Class Reference
Inheritance diagram for com.vertica.sdk.ScalarFunctionFactory:
Collaboration diagram for com.vertica.sdk.ScalarFunctionFactory:
Classes
enum
strictness
enum
volatility
Public Member Functions
abstract ScalarFunction
createScalarFunction (ServerInterface srvInterface)
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
abstract void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
UDXType
getUDXFactoryType ()
Public Attributes
strictness
strict
volatility
vol
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Interface for declaring parameters and return types for, and instantiating, an associated ScalarFunction .
Member Function Documentation
◆ createScalarFunction()
abstract ScalarFunction com.vertica.sdk.ScalarFunctionFactory.createScalarFunction(ServerInterface srvInterface)
abstract
Note
More than one object may be instantiated per query.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
a ScalarFunction object which implements the UDx API described by this metadata.
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources() [1/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources() .
◆ getPerInstanceResources() [2/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
abstract void com.vertica.sdk.UDXFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstractinherited
Provides the argument and return types of the UDX
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments
returnType: the type(s) of the return
Referenced by com.vertica.sdk.ScalarFunctionFactory.getReturnType() .
◆ getReturnType()
void com.vertica.sdk.ScalarFunctionFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
For scalar functions, this function needs to be overridden only if the return type needs length/precision specification.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: The data type of the return value defined by processBlock()
returnType: The size of the data returned by processBlock()
◆ getUDXFactoryType()
UDXType com.vertica.sdk.ScalarFunctionFactory.getUDXFactoryType()
Returns
the object type internally used by Vertica
Member Data Documentation
◆ vol
volatility com.vertica.sdk.ScalarFunctionFactory.vol
Strictness and Volatility settings that the UDSF programmer can set Defaults are VOLATILE and CALLED_ON_NULL_INPUT
101 - com.vertica.sdk.ScalarFunctionFactory Member List
This is the complete list of members for com.vertica.sdk.ScalarFunctionFactory , including all inherited members.
createScalarFunction(ServerInterface srvInterface)
com.vertica.sdk.ScalarFunctionFactory
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDXFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.ScalarFunctionFactory
getUDXFactoryType()
com.vertica.sdk.ScalarFunctionFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
ScalarFunctionFactory() (defined in com.vertica.sdk.ScalarFunctionFactory)
com.vertica.sdk.ScalarFunctionFactory
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
strict (defined in com.vertica.sdk.ScalarFunctionFactory)
com.vertica.sdk.ScalarFunctionFactory
vol
com.vertica.sdk.ScalarFunctionFactory
102 - com.vertica.sdk.ScalarFunctionFactory.strictness Enum Reference
Collaboration diagram for com.vertica.sdk.ScalarFunctionFactory.strictness:
Public Attributes
CALLED_ON_NULL_INPUT
DEFAULT_STRICTNESS
RETURN_NULL_ON_NULL_INPUT
STRICT
Detailed Description
Enum to allow programmatic specification of strictness.
103 - com.vertica.sdk.ScalarFunctionFactory.strictness Member List
This is the complete list of members for com.vertica.sdk.ScalarFunctionFactory.strictness , including all inherited members.
CALLED_ON_NULL_INPUT (defined in com.vertica.sdk.ScalarFunctionFactory.strictness)
com.vertica.sdk.ScalarFunctionFactory.strictness
DEFAULT_STRICTNESS (defined in com.vertica.sdk.ScalarFunctionFactory.strictness)
com.vertica.sdk.ScalarFunctionFactory.strictness
RETURN_NULL_ON_NULL_INPUT (defined in com.vertica.sdk.ScalarFunctionFactory.strictness)
com.vertica.sdk.ScalarFunctionFactory.strictness
STRICT (defined in com.vertica.sdk.ScalarFunctionFactory.strictness)
com.vertica.sdk.ScalarFunctionFactory.strictness
104 - com.vertica.sdk.ScalarFunctionFactory.volatility Enum Reference
Collaboration diagram for com.vertica.sdk.ScalarFunctionFactory.volatility:
Public Attributes
DEFAULT_VOLATILITY
IMMUTABLE
STABLE
VOLATILE
Detailed Description
Enum to allow programmatic specification of volatility.
105 - com.vertica.sdk.ScalarFunctionFactory.volatility Member List
This is the complete list of members for com.vertica.sdk.ScalarFunctionFactory.volatility , including all inherited members.
DEFAULT_VOLATILITY (defined in com.vertica.sdk.ScalarFunctionFactory.volatility)
com.vertica.sdk.ScalarFunctionFactory.volatility
IMMUTABLE (defined in com.vertica.sdk.ScalarFunctionFactory.volatility)
com.vertica.sdk.ScalarFunctionFactory.volatility
STABLE (defined in com.vertica.sdk.ScalarFunctionFactory.volatility)
com.vertica.sdk.ScalarFunctionFactory.volatility
VOLATILE (defined in com.vertica.sdk.ScalarFunctionFactory.volatility)
com.vertica.sdk.ScalarFunctionFactory.volatility
106 - com.vertica.sdk.ServerInterface Class Reference
Collaboration diagram for com.vertica.sdk.ServerInterface:
Public Member Functions
String
getCurrentNodeName ()
String
getDatabaseName ()
HashMap< String, String >
getDependencies ()
long
getFunctionOid ()
String
getLocale ()
String
getNodeName ()
ParamReader
getParamReader ()
ParamReader
getSessionParamReader ()
Map< String, Object >
getSessionStorage ()
ParamReader
getUDSessionParamReader (String nsp)
ParamReader
getUDSessionParamReader ()
SessionParamReaderMap
getUDSessionParamReaderMap ()
String
getUserName ()
void
log (String format, Object... args)
void
setDependencies (HashMap< String, String > depends)
void
setFunctionOid (long oid)
void
setParamReader (ParamReader paramReader)
void
setSessionParamReader (ParamReader sessionParamReader)
void
setUDSessionParameterMap (SessionParamReaderMap udSessionParams)
void
setupInformation (String sqlName, ParamReader paramReader, ParamReader sessionParamReader, String locale, String userName, String nodeName, String dbName, FileManager fileManager)
Public Attributes
FileManager
fileManager
Protected Member Functions
abstract void
vlog (String logEntry)
Detailed Description
Provides UDxs with access to the Vertica server.
Vertica passes a ServerInterface instance to the setup(), destroy(), and main processing functions of each UDx. Key methods for UDx use include log() (to write to the Vertica log), getParamReader() , setParamReader() , getSessionParamReader() , and setSessionParamReader() .
Member Function Documentation
◆ getDatabaseName()
String com.vertica.sdk.ServerInterface.getDatabaseName()
Returns
the name of the database in which this code is executed.
◆ getFunctionOid()
long com.vertica.sdk.ServerInterface.getFunctionOid()
Returns
the function Oid
◆ getLocale()
String com.vertica.sdk.ServerInterface.getLocale()
Returns
the locale of the current session.
◆ getNodeName()
String com.vertica.sdk.ServerInterface.getNodeName()
Returns
the name of the vertica node on which this code is executed.
◆ getParamReader()
ParamReader com.vertica.sdk.ServerInterface.getParamReader()
Returns
The ParamReader that allows accessing parameter values using their names
◆ getSessionParamReader()
ParamReader com.vertica.sdk.ServerInterface.getSessionParamReader()
Returns
The SessionParamReader that allows accessing session parameter values using their names
◆ getUDSessionParamReader() [1/2]
ParamReader com.vertica.sdk.ServerInterface.getUDSessionParamReader(String nsp)
Parameters
Returns
the UDSessionParamReader for the namespace
◆ getUDSessionParamReader() [2/2]
ParamReader com.vertica.sdk.ServerInterface.getUDSessionParamReader()
Returns
The UDSessionParamReader for the default namespace
◆ getUDSessionParamReaderMap()
SessionParamReaderMap com.vertica.sdk.ServerInterface.getUDSessionParamReaderMap()
Returns
the UDSessionParamReaderMap
◆ getUserName()
String com.vertica.sdk.ServerInterface.getUserName()
Returns
the username of the current session.
◆ log()
void com.vertica.sdk.ServerInterface.log(String format, Object... args)
Writes a message to a log file stored in the UDxLogs directory of the database's catalog directory. The SQL name of the UDx is added to the log message, along with the string [UserMessage] to mark the entry as a message added by a call to this method.
Parameters
format: a printf-style format string specifying the log message format.
args: the arguments for the format
◆ setFunctionOid()
void com.vertica.sdk.ServerInterface.setFunctionOid(long oid)
Set the function Oid
Parameters
oid: the function oid to set
◆ setParamReader()
void com.vertica.sdk.ServerInterface.setParamReader(ParamReader paramReader)
Set the paramReader of this ServerInterface when delayed creation is required Used by the code when delayed creation of the parameters is needed Users should not call this function
Parameters
paramReader: the reader to set
◆ setSessionParamReader()
void com.vertica.sdk.ServerInterface.setSessionParamReader(ParamReader sessionParamReader)
Set the sessionParamReader of this ServerInterface
Parameters
sessionParamReader: the reader to set
◆ setUDSessionParameterMap()
void com.vertica.sdk.ServerInterface.setUDSessionParameterMap(SessionParamReaderMap udSessionParams)
Set the UDSessionParamReaderMap
Parameters
udSessionParams: parameters to set
◆ vlog()
abstract void com.vertica.sdk.ServerInterface.vlog(String logEntry)
abstractprotected
Callback for logging, implemented by the server
Parameters
Referenced by com.vertica.sdk.ServerInterface.log() .
Member Data Documentation
◆ fileManager
FileManager com.vertica.sdk.ServerInterface.fileManager
File manager of the session context
107 - com.vertica.sdk.ServerInterface Member List
This is the complete list of members for com.vertica.sdk.ServerInterface , including all inherited members.
fileManager
com.vertica.sdk.ServerInterface
getCurrentNodeName() (defined in com.vertica.sdk.ServerInterface)
com.vertica.sdk.ServerInterface
getDatabaseName()
com.vertica.sdk.ServerInterface
getDependencies() (defined in com.vertica.sdk.ServerInterface)
com.vertica.sdk.ServerInterface
getFunctionOid()
com.vertica.sdk.ServerInterface
getLocale()
com.vertica.sdk.ServerInterface
getNodeName()
com.vertica.sdk.ServerInterface
getParamReader()
com.vertica.sdk.ServerInterface
getSessionParamReader()
com.vertica.sdk.ServerInterface
getSessionStorage() (defined in com.vertica.sdk.ServerInterface)
com.vertica.sdk.ServerInterface
getUDSessionParamReader(String nsp)
com.vertica.sdk.ServerInterface
getUDSessionParamReader()
com.vertica.sdk.ServerInterface
getUDSessionParamReaderMap()
com.vertica.sdk.ServerInterface
getUserName()
com.vertica.sdk.ServerInterface
log(String format, Object... args)
com.vertica.sdk.ServerInterface
setDependencies(HashMap< String, String > depends) (defined in com.vertica.sdk.ServerInterface)
com.vertica.sdk.ServerInterface
setFunctionOid(long oid)
com.vertica.sdk.ServerInterface
setParamReader(ParamReader paramReader)
com.vertica.sdk.ServerInterface
setSessionParamReader(ParamReader sessionParamReader)
com.vertica.sdk.ServerInterface
setUDSessionParameterMap(SessionParamReaderMap udSessionParams)
com.vertica.sdk.ServerInterface
setupInformation(String sqlName, ParamReader paramReader, ParamReader sessionParamReader, String locale, String userName, String nodeName, String dbName, FileManager fileManager) (defined in com.vertica.sdk.ServerInterface)
com.vertica.sdk.ServerInterface
vlog(String logEntry)
com.vertica.sdk.ServerInterface
protected
108 - com.vertica.sdk.SessionParamReaderMap Class Reference
Collaboration diagram for com.vertica.sdk.SessionParamReaderMap:
Public Member Functions
void
addUDSessionParamReader (String nsp, ParamReader sessionParamReader)
Boolean
containsNamespace (String nsp)
Collection< String >
getNamespaces ()
ParamReader
getUDSessionParamReader (String nsp)
void
setUDSessionParamReaderMap (Map< String, ParamReader > paramReaderMap)
Public Attributes
Map< String, ParamReader >
nspToParamReaderMap
Member Function Documentation
◆ addUDSessionParamReader()
void com.vertica.sdk.SessionParamReaderMap.addUDSessionParamReader(String nsp, ParamReader sessionParamReader)
Add a Session ParamReader for a namespace
Parameters
nsp: The namespace and the ParamReader
sessionParamReader: Reader id
◆ containsNamespace()
Boolean com.vertica.sdk.SessionParamReaderMap.containsNamespace(String nsp)
Check if a SessionParamReader for the Namespace exists in the map
Parameters
Returns
true if the SessionParamReader for the Namespace exists false otherwise
◆ getNamespaces()
Collection<String> com.vertica.sdk.SessionParamReaderMap.getNamespaces()
Gets the names of all namespaces
Returns
a vector of column namespaces
◆ getUDSessionParamReader()
ParamReader com.vertica.sdk.SessionParamReaderMap.getUDSessionParamReader(String nsp)
Get a SessionParamReader for a namespace
Parameters
Returns
The SessionParamReader
Referenced by com.vertica.sdk.ServerInterface.getUDSessionParamReader() .
◆ setUDSessionParamReaderMap()
void com.vertica.sdk.SessionParamReaderMap.setUDSessionParamReaderMap(Map< String, ParamReader > paramReaderMap)
Set the SessionParamReaderMap
Parameters
paramReaderMap: The SessionParamReaderMap
109 - com.vertica.sdk.SessionParamReaderMap Member List
This is the complete list of members for com.vertica.sdk.SessionParamReaderMap , including all inherited members.
addUDSessionParamReader(String nsp, ParamReader sessionParamReader)
com.vertica.sdk.SessionParamReaderMap
containsNamespace(String nsp)
com.vertica.sdk.SessionParamReaderMap
getNamespaces()
com.vertica.sdk.SessionParamReaderMap
getUDSessionParamReader(String nsp)
com.vertica.sdk.SessionParamReaderMap
nspToParamReaderMap (defined in com.vertica.sdk.SessionParamReaderMap)
com.vertica.sdk.SessionParamReaderMap
SessionParamReaderMap() (defined in com.vertica.sdk.SessionParamReaderMap)
com.vertica.sdk.SessionParamReaderMap
setUDSessionParamReaderMap(Map< String, ParamReader > paramReaderMap)
com.vertica.sdk.SessionParamReaderMap
110 - com.vertica.sdk.SessionParamWriterMap Class Reference
Collaboration diagram for com.vertica.sdk.SessionParamWriterMap:
Public Member Functions
void
addUDSessionParamWriter (String nsp, ParamWriter sessionParamWriter)
Boolean
containsNamespace (String nsp)
Collection< String >
getNamespaces ()
ParamWriter
getUDSessionParamWriter (String nsp)
ParamWriter
getUDSessionParamWriter ()
Member Function Documentation
◆ addUDSessionParamWriter()
void com.vertica.sdk.SessionParamWriterMap.addUDSessionParamWriter(String nsp, ParamWriter sessionParamWriter)
Add a SessionParamWriter for a namespace
Parameters
nsp: The namespace
sessionParamWriter: The ParamWriter
Referenced by com.vertica.sdk.SessionParamWriterMap.getUDSessionParamWriter() .
◆ containsNamespace()
Boolean com.vertica.sdk.SessionParamWriterMap.containsNamespace(String nsp)
Check if a SessionParamWriter for the Namespace exists in the map
Parameters
Returns
true if the SessionParamWriter for the Namespace exists false otherwise
◆ getNamespaces()
Collection<String> com.vertica.sdk.SessionParamWriterMap.getNamespaces()
Gets the names of all namespaces
Returns
a vector of column namespaces
◆ getUDSessionParamWriter() [1/2]
ParamWriter com.vertica.sdk.SessionParamWriterMap.getUDSessionParamWriter(String nsp)
Get a SessionParamWriter for a namespace
Parameters
Returns
The SessionParamWriter
◆ getUDSessionParamWriter() [2/2]
ParamWriter com.vertica.sdk.SessionParamWriterMap.getUDSessionParamWriter()
Get a SessionParamWriter for a namespace library
Returns
The SessionParamWriter
111 - com.vertica.sdk.SessionParamWriterMap Member List
This is the complete list of members for com.vertica.sdk.SessionParamWriterMap , including all inherited members.
addUDSessionParamWriter(String nsp, ParamWriter sessionParamWriter)
com.vertica.sdk.SessionParamWriterMap
containsNamespace(String nsp)
com.vertica.sdk.SessionParamWriterMap
getNamespaces()
com.vertica.sdk.SessionParamWriterMap
getUDSessionParamWriter(String nsp)
com.vertica.sdk.SessionParamWriterMap
getUDSessionParamWriter()
com.vertica.sdk.SessionParamWriterMap
SessionParamWriterMap() (defined in com.vertica.sdk.SessionParamWriterMap)
com.vertica.sdk.SessionParamWriterMap
112 - com.vertica.sdk.SizedColumnTypes Class Reference
Collaboration diagram for com.vertica.sdk.SizedColumnTypes:
Classes
class
PartitionOrderColumnInfo
Represents the partition by and order by column information for each phase in a multi-phase transform function.
Public Member Functions
void
addBinary (int len, String fieldName)
Adds a column of type BINARY.
void
addBinary (int len)
void
addBinaryOrderColumn (int len, String fieldName)
Adds an order column of type BINARY.
void
addBinaryPartitionColumn (int len, String fieldName)
Adds a partition column of type BINARY.
void
addBool (String fieldName)
Adds a column of type BOOLEAN.
void
addBool ()
void
addBoolOrderColumn (String fieldName)
Adds an order column of type BOOLEAN.
void
addBoolPartitionColumn (String fieldName)
Adds a partition column of type BOOLEAN.
void
addChar (int len, String fieldName)
Adds a column of type CHAR.
void
addChar (int len)
void
addCharOrderColumn (int len, String fieldName)
Adds an order column of type CHAR.
void
addCharPartitionColumn (int len, String fieldName)
Adds a partition column of type CHAR.
void
addDate (String fieldName)
Adds a column of type DATE.
void
addDate ()
void
addDateOrderColumn (String fieldName)
Adds an order column of type DATE.
void
addDatePartitionColumn (String fieldName)
Adds a partition column of type DATE.
void
addFloat (String fieldName)
Adds a column of type FLOAT.
void
addFloat ()
void
addFloatOrderColumn (String fieldName)
Adds an order column of type FLOAT.
void
addFloatPartitionColumn (String fieldName)
Adds a partition column of type FLOAT.
void
addInt (String fieldName)
Adds a column of type INTEGER.
void
addInt ()
void
addIntervalOrderColumn (int precision, int range, String fieldName)
Adds an order column of type INTERVAL/INTERVAL DAY TO SECOND.
void
addIntervalPartitionColumn (int precision, int range, String fieldName)
Adds a partition column of type INTERVAL/INTERVAL DAY TO SECOND.
void
addIntervalYMOrderColumn (int range, String fieldName)
Adds an order column of type INTERVAL YEAR TO MONTH.
void
addIntervalYMPartitionColumn (int range, String fieldName)
Adds a partition column of type INTERVAL YEAR TO MONTH.
void
addIntOrderColumn (String fieldName)
Adds an order column of type INTEGER.
void
addIntPartitionColumn (String fieldName)
Adds a partition column of type INTEGER.
void
addLongVarbinary (int len, String fieldName)
Adds a column of type LONGVARBINARY.
void
addLongVarbinary (int len)
void
addLongVarbinaryOrderColumn (int len, String fieldName)
Adds an order column of type VARBINARY.
void
addLongVarbinaryPartitionColumn (int len, String fieldName)
Adds a partition column of type VARBINARY.
void
addLongVarchar (int len, String fieldName)
Adds a column of type LONGVARCHAR.
void
addLongVarchar (int len)
void
addLongVarcharOrderColumn (int len, String fieldName)
Adds an order column of type VARCHAR.
void
addLongVarcharPartitionColumn (int len, String fieldName)
Adds a partition column of type VARCHAR.
void
addNumeric (int precision, int scale, String fieldName)
Adds a column of type NUMERIC.
void
addNumeric (int precision, int scale)
void
addNumericOrderColumn (int precision, int scale, String fieldName)
Adds an order column of type NUMERIC.
void
addNumericPartitionColumn (int precision, int scale, String fieldName)
Adds a partition column of type NUMERIC.
void
addOrderColumn (BaseDataOID typeOid, int typeMod, String fieldName)
void
addOrderColumn (VerticaType dt, String fieldName)
Adds an order column of the specified type. (only relevant to multiphase UDTs.)
void
addPartitionColumn (BaseDataOID typeOid, int typeMod, String fieldName)
void
addPartitionColumn (VerticaType dt, String fieldName)
Adds a partition column of the specified type (only relevant to multiphase UDTs.)
void
addTime (int precision, String fieldName)
Adds a column of type TIME.
void
addTime (int precision)
void
addTimeOrderColumn (int precision, String fieldName)
Adds an order column of type TIME.
void
addTimePartitionColumn (int precision, String fieldName)
Adds a partition column of type TIME.
void
addTimestamp (String fieldName)
Adds a column of type TIMESTAMP.
void
addTimestamp ()
void
addTimestampOrderColumn (int precision, String fieldName)
Adds an order column of type TIMESTAMP.
void
addTimestampPartitionColumn (int precision, String fieldName)
Adds a partition column of type TIMESTAMP.
void
addTimestampTzOrderColumn (int precision, String fieldName)
Adds an order column of type TIMESTAMP WITH TIMEZONE.
void
addTimestampTzPartitionColumn (int precision, String fieldName)
Adds a partition column of type TIMESTAMP WITH TIMEZONE.
void
addTimeTz (int precision, String fieldName)
Adds a column of type TIME WITH TIMEZONE.
void
addTimeTz (int precision)
void
addTimeTzOrderColumn (int precision, String fieldName)
Adds an order column of type TIME WITH TIMEZONE.
void
addVarbinary (int len, String fieldName)
Adds a column of type VARBINARY.
void
addVarbinary (int len)
void
addVarbinaryOrderColumn (int len, String fieldName)
Adds an order column of type VARBINARY.
void
addVarbinaryPartitionColumn (int len, String fieldName)
Adds a partition column of type VARBINARY.
void
addVarchar (int len, String fieldName)
Adds a column of type VARCHAR.
void
addVarchar (int len)
void
addVarcharOrderColumn (int len, String fieldName)
Adds an order column of type VARCHAR.
void
addVarcharPartitionColumn (int len, String fieldName)
Adds a partition column of type VARCHAR.
void
copyValues (SizedColumnTypes sizedColumnTypes)
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.
void
getOrderByColumns (ArrayList< Integer > cols)
Retrieves indexes of ORDER BY columns in the OVER() clause. Indexes in cols can be used in conjunction with other functions, e.g. getColumnType(size_t) and getColumnName(size_t).
void
getPartitionByColumns (ArrayList< Integer > cols)
Retrieves indexes of PARTITION BY columns in the OVER() clause. Indexes in cols can be used in conjunction with other functions, e.g. getColumnType(size_t) and getColumnName(size_t).
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 (int partition_idx, int order_idx)
Sets the PARTITION BY and ORDER BY column indexes.
void
setPartitionOrderColumnIdx (SizedColumnTypes other)
Sets the PARTITION BY and ORDER BY column indexes from another SizedColumnTypes object.
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
◆ addBinary()
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.
◆ addBinaryOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addBinaryOrderColumn(int len, String fieldName)
Adds an order column of type BINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addBinaryPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addBinaryPartitionColumn(int len, String fieldName)
Adds a partition column of type BINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addBool()
void com.vertica.sdk.SizedColumnTypes.addBool(String fieldName)
Adds a column of type BOOLEAN.
Parameters
fieldName: The name for the output column.
◆ addBoolOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addBoolOrderColumn(String fieldName)
Adds an order column of type BOOLEAN.
Parameters
fieldName: The name for the output column.
◆ addBoolPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addBoolPartitionColumn(String fieldName)
Adds a partition column of type BOOLEAN.
Parameters
fieldName: The name for the output column.
◆ addChar()
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.
◆ addCharOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addCharOrderColumn(int len, String fieldName)
Adds an order column of type CHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ addCharPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addCharPartitionColumn(int len, String fieldName)
Adds a partition column of type CHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ addDate()
void com.vertica.sdk.SizedColumnTypes.addDate(String fieldName)
Adds a column of type DATE.
Parameters
fieldName: The name for the output column.
◆ addDateOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addDateOrderColumn(String fieldName)
Adds an order column of type DATE.
Parameters
fieldName: The name for the output column.
◆ addDatePartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addDatePartitionColumn(String fieldName)
Adds a partition column of type DATE.
Parameters
fieldName: The name for the output column.
◆ addFloat()
void com.vertica.sdk.SizedColumnTypes.addFloat(String fieldName)
Adds a column of type FLOAT.
Parameters
fieldName: The name for the output column.
◆ addFloatOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addFloatOrderColumn(String fieldName)
Adds an order column of type FLOAT.
Parameters
fieldName: The name for the output column.
◆ addFloatPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addFloatPartitionColumn(String fieldName)
Adds a partition column of type FLOAT.
Parameters
fieldName: The name for the output column.
◆ addInt()
void com.vertica.sdk.SizedColumnTypes.addInt(String fieldName)
Adds a column of type INTEGER.
Parameters
fieldName: The name for the output column.
◆ addIntervalOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addIntervalOrderColumn(int precision, int range, String fieldName)
Adds an order column of type INTERVAL/INTERVAL DAY TO SECOND.
Parameters
precision: The precision for the interval.
range: The range for the interval.
fieldName: The name for the output column.
◆ addIntervalPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addIntervalPartitionColumn(int precision, int range, String fieldName)
Adds a partition column of type INTERVAL/INTERVAL DAY TO SECOND.
Parameters
precision: The precision for the interval.
range: The range for the interval.
fieldName: The name for the output column.
◆ addIntervalYMOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addIntervalYMOrderColumn(int range, String fieldName)
Adds an order column of type INTERVAL YEAR TO MONTH.
Parameters
range: The range for the interval.
fieldName: The name for the output column.
◆ addIntervalYMPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addIntervalYMPartitionColumn(int range, String fieldName)
Adds a partition column of type INTERVAL YEAR TO MONTH.
Parameters
range: The range for the interval.
fieldName: The name for the output column.
◆ addIntOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addIntOrderColumn(String fieldName)
Adds an order column of type INTEGER.
Parameters
fieldName: The name for the output column.
◆ addIntPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addIntPartitionColumn(String fieldName)
Adds a partition column of type INTEGER.
Parameters
fieldName: The name for the output column.
◆ addLongVarbinary()
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.
◆ addLongVarbinaryOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addLongVarbinaryOrderColumn(int len, String fieldName)
Adds an order column of type VARBINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addLongVarbinaryPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addLongVarbinaryPartitionColumn(int len, String fieldName)
Adds a partition column of type VARBINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addLongVarchar()
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.
◆ addLongVarcharOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addLongVarcharOrderColumn(int len, String fieldName)
Adds an order column of type VARCHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ addLongVarcharPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addLongVarcharPartitionColumn(int len, String fieldName)
Adds a partition column of type VARCHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ addNumeric()
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.
◆ addNumericOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addNumericOrderColumn(int precision, int scale, String fieldName)
Adds an order 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.
◆ addNumericPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addNumericPartitionColumn(int precision, int scale, String fieldName)
Adds a partition 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.
◆ addTime()
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.
◆ addTimeOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addTimeOrderColumn(int precision, String fieldName)
Adds an order column of type TIME.
Parameters
precision: The precision for the time.
fieldName: The name for the output column.
◆ addTimePartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addTimePartitionColumn(int precision, String fieldName)
Adds a partition column of type TIME.
Parameters
precision: The precision for the time.
fieldName: The name for the output column.
◆ addTimestamp()
void com.vertica.sdk.SizedColumnTypes.addTimestamp(String fieldName)
Adds a column of type TIMESTAMP.
Parameters
fieldName: The name for the output column.
◆ addTimestampOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addTimestampOrderColumn(int precision, String fieldName)
Adds an order column of type TIMESTAMP.
Parameters
precision: The precision for the timestamp.
fieldName: The name for the output column.
◆ addTimestampPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addTimestampPartitionColumn(int precision, String fieldName)
Adds a partition column of type TIMESTAMP.
Parameters
precision: The precision for the timestamp.
fieldName: The name for the output column.
◆ addTimestampTzOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addTimestampTzOrderColumn(int precision, String fieldName)
Adds an order column of type TIMESTAMP WITH TIMEZONE.
Parameters
precision: The precision for the timestamp.
fieldName: The name for the output column.
◆ addTimestampTzPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addTimestampTzPartitionColumn(int precision, String fieldName)
Adds a partition column of type TIMESTAMP WITH TIMEZONE.
Parameters
precision: The precision for the timestamp.
fieldName: The name for the output column.
◆ addTimeTz()
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.
◆ addTimeTzOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addTimeTzOrderColumn(int precision, String fieldName)
Adds an order column of type TIME WITH TIMEZONE.
Parameters
precision: The precision for the time.
fieldName: The name for the output column.
◆ addVarbinary()
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.
◆ addVarbinaryOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addVarbinaryOrderColumn(int len, String fieldName)
Adds an order column of type VARBINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addVarbinaryPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addVarbinaryPartitionColumn(int len, String fieldName)
Adds a partition column of type VARBINARY.
Parameters
len: The length of the binary string.
fieldName: The name for the output column.
◆ addVarchar()
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.
◆ addVarcharOrderColumn()
void com.vertica.sdk.SizedColumnTypes.addVarcharOrderColumn(int len, String fieldName)
Adds an order column of type VARCHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ addVarcharPartitionColumn()
void com.vertica.sdk.SizedColumnTypes.addVarcharPartitionColumn(int len, String fieldName)
Adds a partition column of type VARCHAR.
Parameters
len: The length of the string.
fieldName: The name for the output column.
◆ getArgumentColumns()
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.
◆ getColumnName()
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
Referenced by com.vertica.sdk.PartitionWriter.setRowFromMap() .
◆ getColumnType()
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.
Referenced by
◆ getOrderByColumns()
void com.vertica.sdk.SizedColumnTypes.getOrderByColumns(ArrayList< Integer > cols)
Retrieves indexes of ORDER BY columns in the OVER() clause. 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.
◆ getPartitionByColumns()
void com.vertica.sdk.SizedColumnTypes.getPartitionByColumns(ArrayList< Integer > cols)
Retrieves indexes of PARTITION BY columns in the OVER() clause. 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.
◆ isOrderByColumn()
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
◆ isPartitionByColumn()
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
◆ setPartitionOrderColumnIdx() [1/2]
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
◆ setPartitionOrderColumnIdx() [2/2]
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
113 - com.vertica.sdk.SizedColumnTypes Member List
This is the complete list of members for com.vertica.sdk.SizedColumnTypes , including all inherited members.
addBinary(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addBinary(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addBinaryOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addBinaryPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addBool(String fieldName)
com.vertica.sdk.SizedColumnTypes
addBool() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addBoolOrderColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addBoolPartitionColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addChar(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addChar(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addCharOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addCharPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addDate(String fieldName)
com.vertica.sdk.SizedColumnTypes
addDate() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addDateOrderColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addDatePartitionColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addFloat(String fieldName)
com.vertica.sdk.SizedColumnTypes
addFloat() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addFloatOrderColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addFloatPartitionColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addInt(String fieldName)
com.vertica.sdk.SizedColumnTypes
addInt() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addIntervalOrderColumn(int precision, int range, String fieldName)
com.vertica.sdk.SizedColumnTypes
addIntervalPartitionColumn(int precision, int range, String fieldName)
com.vertica.sdk.SizedColumnTypes
addIntervalYMOrderColumn(int range, String fieldName)
com.vertica.sdk.SizedColumnTypes
addIntervalYMPartitionColumn(int range, String fieldName)
com.vertica.sdk.SizedColumnTypes
addIntOrderColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addIntPartitionColumn(String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarbinary(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarbinary(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addLongVarbinaryOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarbinaryPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarchar(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarchar(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addLongVarcharOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addLongVarcharPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addNumeric(int precision, int scale, String fieldName)
com.vertica.sdk.SizedColumnTypes
addNumeric(int precision, int scale) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addNumericOrderColumn(int precision, int scale, String fieldName)
com.vertica.sdk.SizedColumnTypes
addNumericPartitionColumn(int precision, int scale, String fieldName)
com.vertica.sdk.SizedColumnTypes
addOrderColumn(BaseDataOID typeOid, int typeMod, String fieldName) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addOrderColumn(VerticaType dt, String fieldName)
com.vertica.sdk.SizedColumnTypes
addPartitionColumn(BaseDataOID typeOid, int typeMod, String fieldName) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addPartitionColumn(VerticaType dt, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTime(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTime(int precision) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addTimeOrderColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimePartitionColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimestamp(String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimestamp() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addTimestampOrderColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimestampPartitionColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimestampTzOrderColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimestampTzPartitionColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimeTz(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addTimeTz(int precision) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addTimeTzOrderColumn(int precision, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarbinary(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarbinary(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addVarbinaryOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarbinaryPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarchar(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarchar(int len) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
addVarcharOrderColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
addVarcharPartitionColumn(int len, String fieldName)
com.vertica.sdk.SizedColumnTypes
copyValues(SizedColumnTypes sizedColumnTypes) (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
getArgumentColumns(ArrayList< Integer > cols)
com.vertica.sdk.SizedColumnTypes
getColumnCount()
com.vertica.sdk.SizedColumnTypes
getColumnName(int idx)
com.vertica.sdk.SizedColumnTypes
getColumnType(int idx)
com.vertica.sdk.SizedColumnTypes
getLastOrderColumnIdx()
com.vertica.sdk.SizedColumnTypes
getLastPartitionColumnIdx()
com.vertica.sdk.SizedColumnTypes
getOrderByColumns(ArrayList< Integer > cols)
com.vertica.sdk.SizedColumnTypes
getPartitionByColumns(ArrayList< Integer > cols)
com.vertica.sdk.SizedColumnTypes
isOrderByColumn(int idx)
com.vertica.sdk.SizedColumnTypes
isPartitionByColumn(int idx)
com.vertica.sdk.SizedColumnTypes
setPartitionOrderColumnIdx(int partition_idx, int order_idx)
com.vertica.sdk.SizedColumnTypes
setPartitionOrderColumnIdx(SizedColumnTypes other)
com.vertica.sdk.SizedColumnTypes
SizedColumnTypes() (defined in com.vertica.sdk.SizedColumnTypes)
com.vertica.sdk.SizedColumnTypes
114 - com.vertica.sdk.SourceFactory Class Reference
Inheritance diagram for com.vertica.sdk.SourceFactory:
Collaboration diagram for com.vertica.sdk.SourceFactory:
Public Member Functions
int
getDesiredThreads (ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
UDXType
getUDXFactoryType ()
boolean
isSourceApportionable ()
void
plan (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
SourceIterator
prepare (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
SourceIterator
prepare (ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
ArrayList< UDSource >
prepareUDSources (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
ArrayList< UDSource >
prepareUDSources (ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Produces and initializes UDSources to process input data sources.
Subclassing SourceFactory is the preferred way to implement a factory corresponding to a UDSource . If you need more flexibility, implement both IterativeSourceFactory and SourceIterator . (See the documentation of IterativeSourceFactory .)
Member Function Documentation
◆ getDesiredThreads()
int com.vertica.sdk.SourceFactory.getDesiredThreads(ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Request the number of threads that the SourceFactory wants to use. This function is called on each node before prepareUDSources() .
'planCtxt' contains the same parameters stored by plan() method. It also exposes the maximum number of allowed threads, via 'getMaxAllowedThreads()'. Further computations can be stored in its 'ExecutorParamWriter ' object, for use in prepare() .
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources()
void com.vertica.sdk.UDLFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
void com.vertica.sdk.UDLFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
inherited
Provides the argument and return types of the UDL. UDL's take no input tuples; as such, their prototype is empty.
◆ getReturnType()
void com.vertica.sdk.UDLFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
inherited
Not used in this form
◆ isSourceApportionable()
boolean com.vertica.sdk.IterativeSourceFactory.isSourceApportionable()
inherited
Returns
if this source factory has the capability to generate source with portions
◆ plan()
void com.vertica.sdk.SourceFactory.plan(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Execute any planning logic required at query plan time. This method is run once per query, during query initialization. Its job is to perform parameter validation, and to modify the set of nodes that the COPY statement will run on.
plan() runs exactly once per query, on the initiator node. If it throws an exception, the query will not proceed; it will be aborted prior to distributing the query to the other nodes and running prepare() .
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan(). Also provides functionality for specifying which nodes this query will run on.
Exceptions
UdfException: UDF problem
◆ prepare() [1/2]
SourceIterator com.vertica.sdk.IterativeSourceFactory.prepare(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
inherited
Prepare this SourceFactory to start creating sources. This function will be called on each node, prior to the Load operator starting to execute and prior to any other virtual functions on this class being called.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup.
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan() and getDesiredThreads(). It also provides functionality for determining which nodes this query is running on.
Returns
A SourceIterator object for use in the query.
Exceptions
UdfException: UDF problem
Referenced by com.vertica.sdk.IterativeSourceFactory.prepare() .
◆ prepare() [2/2]
SourceIterator com.vertica.sdk.SourceFactory.prepare(ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
INTERNAL
Referenced by com.vertica.sdk.SourceFactory.getDesiredThreads() .
◆ prepareUDSources() [1/2]
ArrayList<UDSource> com.vertica.sdk.SourceFactory.prepareUDSources(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Create UDSources. This function will be called on each node, prior to the Load operator starting to execute.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup.
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan() and getDesiredThreads(). It also provides functionality for determining which nodes this query is running on.
Returns
An ArrayList of UDSources to use for this query. Sources will be loaded in a pooled manner, several at a time.
Exceptions
UdfException: UDF problem
Referenced by
◆ prepareUDSources() [2/2]
ArrayList<UDSource> com.vertica.sdk.SourceFactory.prepareUDSources(ServerInterface srvInterface, ExecutorPlanContext planCtxt) throws UdfException
Create UDSources. This function will be called on each node, prior to the Load operator starting to execute.
Parameters
srvInterface: Interface to server operations and functionality, including (not-per-column) parameter lookup.
planCtxt: Context for storing and retrieving arbitrary data, for use just by this instance of this query. The same context is shared with plan() and getDesiredThreads(). It provides functionality for determining which nodes this query is running on, as well as the number of threads allowed by the resource pool (via getMaxAllowedThreads()) and, more importantly, the actual load concurrency (via getLoadConcurrency()).
Returns
An ArrayList of UDSources to use for this query. Sources will be loaded in a pooled manner, several at a time.
Exceptions
UdfException: UDF problem
115 - com.vertica.sdk.SourceFactory Member List
This is the complete list of members for com.vertica.sdk.SourceFactory , including all inherited members.
getDesiredThreads(ServerInterface srvInterface, ExecutorPlanContext planCtxt)
com.vertica.sdk.SourceFactory
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res) (defined in com.vertica.sdk.UDLFactory)
com.vertica.sdk.UDLFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDLFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDLFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDLFactory
getUDXFactoryType() (defined in com.vertica.sdk.IterativeSourceFactory)
com.vertica.sdk.IterativeSourceFactory
isSourceApportionable()
com.vertica.sdk.IterativeSourceFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
plan(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceFactory
prepare(ServerInterface srvInterface, ExecutorPlanContext planCtxt)
com.vertica.sdk.SourceFactory
com::vertica::sdk::IterativeSourceFactory.prepare(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.IterativeSourceFactory
prepareUDSources(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceFactory
prepareUDSources(ServerInterface srvInterface, ExecutorPlanContext planCtxt)
com.vertica.sdk.SourceFactory
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
116 - com.vertica.sdk.SourceIterator Class Reference
Inheritance diagram for com.vertica.sdk.SourceIterator:
Collaboration diagram for com.vertica.sdk.SourceIterator:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
abstract UnsizedUDSource
createNextSource (ServerInterface srvInterface) throws UdfException
void
destroy (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
abstract int
getNumberOfSources () throws UdfException
Integer
getSizeOfSource (int sourceNum) throws UdfException
boolean
isCanceled ()
void
setup (ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Constructs a set of Sources to be used by an IterativeSourceFactory .
createNextSource() will be called repeatedly until it returns NULL. Each resulting Source will be read to completion, and the contained data passed to the Filter and Parser.
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ createNextSource()
abstract UnsizedUDSource com.vertica.sdk.SourceIterator.createNextSource(ServerInterface srvInterface) throws UdfException
abstract
Create the next UDSource to process.
Should return NULL if no further sources are available for processing.
Note that the previous Source may still be open and in use on a different thread when this function is called.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
a new Source instance corresponding to a new input stream
Exceptions
UdfException: UDF problem
◆ destroy()
void com.vertica.sdk.SourceIterator.destroy(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Tear down this SourceIterator
Should perform clean-up
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: a plan context
Exceptions
UdfException: UDF problem
◆ getNumberOfSources()
abstract int com.vertica.sdk.SourceIterator.getNumberOfSources() throws UdfException
abstract
Returns
the total number of Sources that this factory will produce
Exceptions
UdfException: UDF problem
Referenced by com.vertica.sdk.SourceFactory.getDesiredThreads() .
◆ getSizeOfSource()
Integer com.vertica.sdk.SourceIterator.getSizeOfSource(int sourceNum) throws UdfException
Parameters
sourceNum: which source to query
Returns
the raw-data size of the sourceNum'th source that will be produced by createNextSource() . Should return vint_null if the size is unknown.
This value is used as a hint, and is used by the "load_streams" table to display load progress. If incorrect or not set, "load_streams" may contain incorrect or unhelpful information.
Exceptions
UdfException: UDF problem
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ setup()
void com.vertica.sdk.SourceIterator.setup(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt) throws UdfException
Set up this SourceIterator
Should perform setup that should not take place in the constructor due to the exception-handling semantics of constructors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
planCtxt: a plan context
Exceptions
UdfException: UDF problem
117 - com.vertica.sdk.SourceIterator Member List
This is the complete list of members for com.vertica.sdk.SourceIterator , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
createNextSource(ServerInterface srvInterface)
com.vertica.sdk.SourceIterator
destroy(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceIterator
getNumberOfSources()
com.vertica.sdk.SourceIterator
getSizeOfSource(int sourceNum)
com.vertica.sdk.SourceIterator
isCanceled()
com.vertica.sdk.UDXObject
setup(ServerInterface srvInterface, NodeSpecifyingPlanContext planCtxt)
com.vertica.sdk.SourceIterator
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
118 - com.vertica.sdk.StandardTypeCoercion Class Reference
Inheritance diagram for com.vertica.sdk.StandardTypeCoercion:
Collaboration diagram for com.vertica.sdk.StandardTypeCoercion:
Classes
enum
BooleanEvaluation
class
SpecialBigDecimal
Public Member Functions
StandardTypeCoercion ()
ByteBuffer
asBinaryBytes (Object value, int length, VerticaType type)
Boolean
asBoolean (Object value, VerticaType type)
Boolean
asBooleanByJava (Object value, VerticaType type)
Boolean
asBooleanByNumeric (Object value, VerticaType type)
Boolean
asBooleanByPerl (Object value, VerticaType type)
Boolean
asBooleanByPython (Object value, VerticaType type)
Boolean
asBooleanByVertica (Object value, VerticaType type)
ByteBuffer
asCharBytes (Object value, int length, VerticaType type)
java.sql.Date
asDate (Object value, VerticaType type)
Double
asDouble (Object value, VerticaType type)
Long
asLong (Object value, VerticaType type)
java.sql.Timestamp
asTimestamp (Object value, VerticaType type)
BooleanEvaluation
getBooleanEvaluation ()
DateFormat
getDateFormat ()
DateFormat
getDateParse ()
DateFormat
getDefaultDateFormat ()
DateFormat
getDefaultDateParse ()
DateFormat
getDefaultTimestampFormat ()
DateFormat
getDefaultTimestampParse ()
Iterator< Object >
getListIterator (Object value)
Iterator< Map.Entry< String, Object > >
getMapIterator (Object value)
MetaType
getMetaType (Object value)
Set< TypeCoercionPolicy >
getPolicy ()
DateFormat
getTimestampFormat ()
DateFormat
getTimestampParse ()
java.sql.Date
parseDate (String value, VerticaType type)
java.sql.Timestamp
parseTimestamp (String value, VerticaType type)
void
setBooleanEvaluation (BooleanEvaluation boolEval)
void
setDateFormat (DateFormat fmt)
void
setDateParse (DateFormat fmt)
void
setPolicy (Collection< TypeCoercionPolicy > policy)
void
setTimestampFormat (DateFormat fmt)
void
setTimestampParse (DateFormat fmt)
Protected Member Functions
Collection< TypeCoercionPolicy >
getDefaultPolicy ()
void
invalidInputType (Object value, VerticaType type)
void
invalidInputValue (Object value, VerticaType type)
SpecialBigDecimal
parseNumber (char[] text)
void
unsupportedType (Object value, VerticaType type)
void
valueTooLarge (Object value, VerticaType type)
Detailed Description
StandardTypeCoercion implements standard type conversions. It provides some ability to configure how certain values (such as booleans and dates) are Interpreted or formatted.
The default policy favors errors and avoids modifying data. See getDefaultPolicy() . Values may be truncated if the policy includes TRUNCATE_VALUES .
Constructor & Destructor Documentation
◆ StandardTypeCoercion()
com.vertica.sdk.StandardTypeCoercion.StandardTypeCoercion()
Create a default instance of StandardTypeCoercion using the default policy.
See also
getDefaultPolicy()
Member Function Documentation
◆ asBinaryBytes()
ByteBuffer com.vertica.sdk.NoopTypeCoercion.asBinaryBytes(Object value, int length, VerticaType type)
inherited
Generates a ByteBuffer (or null) value out of a sequence of bytes. Acceptable input types are byte array and ByteBuffer. All other types are invalid and will result in null or a TypeCoercionException according to the policy.
In agreement with how 'binary' values are stored in Vertica, values smaller than the target length are right-extended to length with the zero byte.
The value will be truncated to length when necessary if TRUNCATE_VALUES is specified in the policy. Otherwise values that are too long are treated as invalid input values (see FAIL_INVALID_INPUT_VALUE ).
See also
VerticaType::isBinary()
Implements com.vertica.sdk.TypeCoercion .
◆ asBoolean()
Boolean com.vertica.sdk.StandardTypeCoercion.asBoolean(Object value, VerticaType type)
Generates a Boolean (or null) value out of input values of various types, depending on the boolean evaluation strategy. Uses one of the various 'asBoolean' methods according to the current boolean evaluation strategy.
See also
setBooleanEvaluation(BooleanEvaluation)
asBooleanByVertica(Object, VerticaType)
asBooleanByPerl(Object, VerticaType)
asBooleanByPython(Object, VerticaType)
asBooleanByJava(Object, VerticaType)
asBooleanByNumeric(Object, VerticaType)
Implements com.vertica.sdk.TypeCoercion .
◆ asBooleanByJava()
Boolean com.vertica.sdk.StandardTypeCoercion.asBooleanByJava(Object value, VerticaType type)
Interprets a Boolean value in a similar manner as Java's Boolean#valueOf(String) function, which handles only Strings.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
value coerced to Boolean, potentially null.
Referenced by com.vertica.sdk.StandardTypeCoercion.asBoolean() .
◆ asBooleanByNumeric()
Boolean com.vertica.sdk.StandardTypeCoercion.asBooleanByNumeric(Object value, VerticaType type)
Interprets a Boolean value in a similar manner as C/C++, where numeric values and booleans aren't strictly separated. Rather than handling only integer numerics, this handles all numerics.
null values are null.
Boolean values are used as-is.
Number values are evaluated based on Number#doubleValue(). 0.0 is false and all other values are true.
All other types are invalid input types.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
value coerced to Boolean, potentially null.
Referenced by com.vertica.sdk.StandardTypeCoercion.asBoolean() .
◆ asBooleanByPerl()
Boolean com.vertica.sdk.StandardTypeCoercion.asBooleanByPerl(Object value, VerticaType type)
Interprets a Boolean value in a similar manner as Perl does. Unlike Perl which treats undef as false, the null value will give a null Boolean. Otherwise, behavior follows the Perl behavior as closely as possible.
null values are null.
Boolean values are used as-is.
String values are false if empty (length() == 0) or if equal to "0". Strings are true otherwise. Whitespace is NOT ignored.
Number values are evaluated based on doubleValue(). 0.0 is false and all other values are True.
Collection and Map values are false if empty (size() == 0) and true otherwise.
All other types are true. Therefore, this will never result in an invalid input type.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
value coerced to Boolean, potentially null.
Referenced by com.vertica.sdk.StandardTypeCoercion.asBoolean() .
◆ asBooleanByPython()
Boolean com.vertica.sdk.StandardTypeCoercion.asBooleanByPython(Object value, VerticaType type)
Interprets a Boolean value in a similar manner as Python does. Unlike Python which treats None as False, the null value will give a null Boolean. Otherwise, behavior follows the Python language specification. See "5.10 Boolean operations" in the Python 2.x reference on expressions.
null values are null.
Boolean values are used as-is.
String values are false if empty (length() == 0) and true otherwise. Whitespace is NOT ignored.
Number values are evaluated based on doubleValue(). 0.0 is false and all other values are True.
Collection and Map values are false if empty (size() == 0) and true otherwise.
All other types are true. Therefore, this will never result in an invalid input type.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
value coerced to Boolean, potentially null.
Referenced by com.vertica.sdk.StandardTypeCoercion.asBoolean() .
◆ asBooleanByVertica()
Boolean com.vertica.sdk.StandardTypeCoercion.asBooleanByVertica(Object value, VerticaType type)
Interprets a Boolean value in a similar manner as Vertica does internally.
null values are null.
Boolean values are used as-is.
The following String values are true, after trimming leading and trailing whitespace and ignoring case: 't', 'true', 'y', 'yes', '1'.
The following String values are false, after trimming leading and trailing whitespace and ignoring case: 'f', 'false', 'n', 'no', '0'.
All other String values are invalid input values.
Number values are evaluated based on doubleValue(). 0.0 is false and 1.0 is true. All other values are invalid input values.
All other types are invalid input types.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
value coerced to Boolean, potentially null.
Referenced by com.vertica.sdk.StandardTypeCoercion.asBoolean() .
◆ asCharBytes()
ByteBuffer com.vertica.sdk.StandardTypeCoercion.asCharBytes(Object value, int length, VerticaType type)
Generates a ByteBuffer with the string representation of an object. Generally uses the same approach as Vertica's vsql presentation format for analogous types. Unknown types will use Java's String#valueOf(Object).
The value will be truncated to length when necessary if TRUNCATE_VALUES is specified in the policy. Otherwise values that are too long will return in either a null return value or a TypeCoercionException according to the policy (FAIL_INVALID_INPUT_VALUE ).
In agreement with how 'char' values are stored in Vertica, trailing spaces will be removed if the type is 'char'.
Specifically, the following describes the textual representation of various types, which then undergoes truncation and trimming as necessary.
null values are null.
String values are used as-is.
Long, Integer, Short, Byte, AtomicLong, AtomicInteger, and BigInteger types are represented in decimal, without ever using scientific notation. Negative values are preceded with a '-'.
BigDecimal is also represented in decimal, without ever using scientific notation. BigDecimal#toPlainString() method is used.
All other Number types are represented by passing the Number#doubleValue() through Double#toString() which uses scientific notation and represents NaN and Infinity.
Boolean values are represented as 'true' or 'false'.
java.sql.Date values are formatted with the format given by getDateFormat()
java.util.Date values (including java.sql.Timestamp values) are formatted with the format given by getTimestampFormat() .
String#valueOf(Object) is used for all other values.
See also
VerticaType::isChar()
Implements com.vertica.sdk.TypeCoercion .
◆ asDate()
java.sql.Date com.vertica.sdk.StandardTypeCoercion.asDate(Object value, VerticaType type)
Generate a java.sql.Date representation of the provided object.
null values are null.
java.sql.Date values are used as-is. java.util.Date values are converted to java.sql.Date.
String values are handled by parseDate(String, VerticaType) .
All other types are invalid input types.
See also
parseDate(String, VerticaType)
Implements com.vertica.sdk.TypeCoercion .
◆ asDouble()
Double com.vertica.sdk.StandardTypeCoercion.asDouble(Object value, VerticaType type)
Generates a Double representation of the provided object.
null values are null.
Number values use Number#doubleValue().
Strings are parsed by the following rules. Violations are invalid input values. Note that the double data type has a limited range of precision and magnitude. Some precision may be lost. Extreme values may be represented as Infinity or -Infinity.
A hexidecimal integer value starting with '0x' or '0X' with optional leading '-' or '+'.
'Infinity' (case insensitive) with optional leading '-' or '+'.
'NaN' (case insensitive) with optional leading '-' or '+'.
A decimal number with or without scientific notation, with optional leading '-' or '+'
All other types are invalid input types.
Implements com.vertica.sdk.TypeCoercion .
◆ asLong()
Long com.vertica.sdk.StandardTypeCoercion.asLong(Object value, VerticaType type)
Generates a Long representation of the provided object.
null values are null.
Number values use Number#doubleValue(). This usually implies truncation of any fractional part of the value, regardless of the truncation policy.
Strings are parsed by the following rules. Violations are invalid input values. Note that the long data type has a limited range of magnitude. Values outside of this range are invalid input values. Values with fractional parts are truncated.
A hexidecimal integer value starting with '0x' or '0X' with optional leading '-' or '+'.
A decimal number with or without scientific notation, with optional leading '-' or '+'
All other types are invalid input types.
Implements com.vertica.sdk.TypeCoercion .
◆ asTimestamp()
java.sql.Timestamp com.vertica.sdk.StandardTypeCoercion.asTimestamp(Object value, VerticaType type)
Generate a java.sql.Timestamp representation of the provided object.
null values are null.
java.sql.Timestamp values are used as-is. java.util.Date values are converted to java.sql.Timestamp via getTime().
String values are handled by parseTimestamp(String, VerticaType) .
All other types are invalid input types.
See also
parseTimestamp(String, VerticaType)
Implements com.vertica.sdk.TypeCoercion .
◆ getBooleanEvaluation()
BooleanEvaluation com.vertica.sdk.StandardTypeCoercion.getBooleanEvaluation()
Get the boolean evaluation strategy. The default is VERTICA .
Returns
The current boolean evaluation strategy.
DateFormat com.vertica.sdk.StandardTypeCoercion.getDateFormat()
Get the DateFormat used for formatting date types. This is used during asCharBytes for appropriately typed objects.
Returns
The format in use.
See also
asCharBytes(Object, int, VerticaType)
Referenced by com.vertica.sdk.StandardTypeCoercion.asCharBytes() .
◆ getDateParse()
DateFormat com.vertica.sdk.StandardTypeCoercion.getDateParse()
Retrieve the current DateFormat used for parsing java.sql.Date values in parseDate(String, VerticaType) . Does not return null.
Returns
The format in use.
See also
getDefaultDateParse()
parseDate(String, VerticaType)
Referenced by com.vertica.sdk.StandardTypeCoercion.parseDate() .
DateFormat com.vertica.sdk.StandardTypeCoercion.getDefaultDateFormat()
Get the default DateFormat used for formatting date types to Strings. The format is 'yyyy-MM-dd' in the JVM default timezone. This is used during asCharBytes for appropriately typed objects.
Returns
The default format used by new instances.
See also
asCharBytes(Object, int, VerticaType)
Referenced by
◆ getDefaultDateParse()
DateFormat com.vertica.sdk.StandardTypeCoercion.getDefaultDateParse()
Get the default DateFormat used for parsing date types from Strings. The format is 'yyyy-MM-dd' in the JVM default timezone and is not lenient.
For more flexibility, override parseDate(String, VerticaType) or install a different date format.
See also
parseDate(String, VerticaType)
setDateParse(DateFormat)
Returns
The default format used by new instances.
Referenced by
◆ getDefaultPolicy()
Collection<TypeCoercionPolicy> com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy()
protected inherited
Provides the default policy installed by the constructor.
For NoopTypeCoercion , the default policy favors errors and avoids modifying data:
DateFormat com.vertica.sdk.StandardTypeCoercion.getDefaultTimestampFormat()
Get the default DateFormat used for formatting timestamp types to Strings. The format is 'yyyy-MM-dd HH:mm:ss.SSS' in the JVM default timezone. This is used during asCharBytes for appropriately typed objects.
Returns
The default format used by new instances.
See also
asCharBytes(Object, int, VerticaType)
Referenced by
◆ getDefaultTimestampParse()
DateFormat com.vertica.sdk.StandardTypeCoercion.getDefaultTimestampParse()
Get the default DateFormat used for parsing timestamp types from Strings. The format is 'yyyy-MM-dd HH:mm:ss.SSS' in the JVM default timezone and is not lenient.
For more flexibility, override parseTimestamp(String, VerticaType) or install a different date format.
See also
parseTimestamp(String, VerticaType)
setTimestampParse(DateFormat)
Returns
The default format used by new instances.
Referenced by
◆ getListIterator()
Iterator<Object> com.vertica.sdk.NoopTypeCoercion.getListIterator(Object value)
inherited
Provides an Iterator over Objects for a given Iterable input.
Parameters
value: Something implementing Iterable
Implements com.vertica.sdk.TypeCoercion .
◆ getMapIterator()
Iterator<Map.Entry<String,Object> > com.vertica.sdk.NoopTypeCoercion.getMapIterator(Object value)
inherited
Provides an Iterator over map entries for a given Map.
Internal maps are assumed to have String keys. A ClassCastException will eventually result if there are internal maps with keys that are not Strings.
Parameters
value: Something implementing Map<String,Object>
Implements com.vertica.sdk.TypeCoercion .
MetaType com.vertica.sdk.NoopTypeCoercion.getMetaType(Object value)
inherited
Detects Java standard Map and Iterable types.
Internal maps are assumed to have String keys. A ClassCastException will result if there are internal maps with keys that are not Strings.
Implements com.vertica.sdk.TypeCoercion .
◆ getPolicy()
Set<TypeCoercionPolicy> com.vertica.sdk.NullTypeCoercion.getPolicy()
inherited
Returns an unmodifiable version of the policy.
Returns
The policy collection.
See also
setPolicy
Implements com.vertica.sdk.TypeCoercion .
Referenced by
DateFormat com.vertica.sdk.StandardTypeCoercion.getTimestampFormat()
Get the current DateFormat used for formatting timestamp types. This is used during asCharBytes for appropriately typed objects.
Returns
The format in use.
See also
asCharBytes(Object, int, VerticaType)
Referenced by com.vertica.sdk.StandardTypeCoercion.asCharBytes() .
◆ getTimestampParse()
DateFormat com.vertica.sdk.StandardTypeCoercion.getTimestampParse()
Retrieve the current DateFormat used for parsing java.sql.Timestamp values in parseTimestamp(String, VerticaType) . Does not return null.
Returns
The format in use.
See also
getDefaultTimestampParse()
parseTimestamp(String, VerticaType)
Referenced by com.vertica.sdk.StandardTypeCoercion.parseTimestamp() .
void com.vertica.sdk.NoopTypeCoercion.invalidInputType(Object value, VerticaType type)
protected inherited
Throws a TypeCoercionException if the policy includes FAIL_INVALID_INPUT_TYPE . Otherwise does nothing.
Parameters
value: The value being coerced.
type: The target type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
void com.vertica.sdk.StandardTypeCoercion.invalidInputValue(Object value, VerticaType type)
protected
Throws a TypeCoercionException if the policy includes FAIL_INVALID_INPUT_VALUE . Otherwise does nothing.
Parameters
value: The value being coerced.
type: The target Vertica type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
◆ parseDate()
java.sql.Date com.vertica.sdk.StandardTypeCoercion.parseDate(String value, VerticaType type)
Parse a date from a String using the current date parsing format.
Note that java.sql.Date specifies that values should be normalized by setting all non-day units to 0. This is not necessary or expected of return values from parseDate.
Parameters
value: The String value being coerced, which is not null.
type: The target Vertica type, which is a date type.
Returns
The input value as a date, or null.
See also
setDateParse(DateFormat)
getDefaultDateParse()
Referenced by com.vertica.sdk.StandardTypeCoercion.asDate() .
◆ parseNumber()
SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.parseNumber(char \[\] text)
protected
Parses a textual representation of a number into a SpecialBigDecimal . Input text is trimmed of whitespace, then evaluated as a perfect fit to:
A hexidecimal integer value starting with '0x' or '0X' with optional leading '-' or '+'.
'Infinity' (case insensitive) with optional leading '-' or '+'.
'NaN' (case insensitive) with optional leading '-' or '+'.
A decimal number with or without scientific notation, with optional leading '-' or '+'.
Parameters
text: A string as a character array.
Returns
A SpecialBigDecimal representing the value of the text, whether that is a BigDecimal value or a special non-real value.
Referenced by
◆ parseTimestamp()
java.sql.Timestamp com.vertica.sdk.StandardTypeCoercion.parseTimestamp(String value, VerticaType type)
Parse a timestamp from a String using the current timestamp parsing format. Because DateFormat#parse(String, ParsePosition) returns a java.sql.Date, the precision of this operation is only milliseconds, which is less than Vertica's possible precision of microseconds.
Note that timestamptz (aka 'timestamp with time zone') and timestamp values are parsed in the same manner, regardless of the current session's timezone.
Parameters
value: The String value being coerced, which is not null.
type: The target Vertica type, which is either timestamp or timestamptz.
Returns
A timestamp value, or null.
See also
setTimestampParse(DateFormat)
getDefaultTimestampParse()
Referenced by com.vertica.sdk.StandardTypeCoercion.asTimestamp() .
◆ setBooleanEvaluation()
void com.vertica.sdk.StandardTypeCoercion.setBooleanEvaluation(BooleanEvaluation boolEval)
Set the boolean evaluation strategy. The default is VERTICA .
Parameters
boolEval: A boolean evaluation strategy
See also
asBooleanByVertica(Object, VerticaType)
asBooleanByPerl(Object, VerticaType)
asBooleanByPython(Object, VerticaType)
asBooleanByJava(Object, VerticaType)
asBooleanByNumeric(Object, VerticaType)
void com.vertica.sdk.StandardTypeCoercion.setDateFormat(DateFormat fmt)
Set the DateFormat used for formatting date types. This is used during asCharBytes for appropriately typed objects. Only the format method will be used; other methods do not need to be implemented.
Parameters
See also
asCharBytes(Object, int, VerticaType)
◆ setDateParse()
void com.vertica.sdk.StandardTypeCoercion.setDateParse(DateFormat fmt)
Set the DateFormat used for parsing java.sql.Date values in parseDate . If null, the default date parse format is used.
Note
Non-Lenient DateFormats are strongly encouraged. Lenient date formats can cause surprising results in some scenarios.
Parameters
See also
getDefaultDateParse()
parseDate(String, VerticaType)
◆ setPolicy()
void com.vertica.sdk.NullTypeCoercion.setPolicy(Collection< TypeCoercionPolicy > policy)
inherited
Sets the policies for this TypeCoercion instance. Policies generally dictate which scenarios generate exceptions and allow for different error handling choices without implementing a new TypeCoercion class.
Parameters
policy: The policy collection
See also
TypeCoercionPolicy
getPolicy()
Implements com.vertica.sdk.TypeCoercion .
Referenced by com.vertica.sdk.NullTypeCoercion.NullTypeCoercion() .
void com.vertica.sdk.StandardTypeCoercion.setTimestampFormat(DateFormat fmt)
Set the DateFormat used for formatting timestamp types. This is used during asCharBytes for appropriately typed objects. Only the format method will be used; other methods do not need to be implemented.
Parameters
See also
asCharBytes(Object, int, VerticaType)
◆ setTimestampParse()
void com.vertica.sdk.StandardTypeCoercion.setTimestampParse(DateFormat fmt)
Set the DateFormat used for parsing java.sql.Timestamp values in parseTimestamp . If null, the default timestamp parse format is used.
Note
Non-Lenient DateFormats are strongly encouraged. Lenient date formats can cause surprising results in some scenarios.
Parameters
See also
getDefaultTimestampParse()
parseTimestamp(String, VerticaType)
◆ unsupportedType()
void com.vertica.sdk.NullTypeCoercion.unsupportedType(Object value, VerticaType type)
protected inherited
Throws a TypeCoercionException if the policy includes TypeCoercionPolicy#FAIL_UNSUPPORTED_TYPE . Otherwise does nothing.
Parameters
value: The value provided which could not be coerced.
type: The target Vertica type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
void com.vertica.sdk.NoopTypeCoercion.valueTooLarge(Object value, VerticaType type)
protected inherited
Throws a TypeCoercionException with a TRUNCATE_VALUES cause if the policy includes FAIL_INVALID_INPUT_VALUE . Otherwise does nothing.
This should only be called if the policy does not request truncation via TRUNCATE_VALUES .
Parameters
value: The value being coerced.
type: The target type.
See also
getPolicy()
#setPolicy(Collection)
Referenced by
119 - com.vertica.sdk.StandardTypeCoercion Member List
This is the complete list of members for com.vertica.sdk.StandardTypeCoercion , including all inherited members.
asBinaryBytes(Object value, int length, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
asBoolean(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asBooleanByJava(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asBooleanByNumeric(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asBooleanByPerl(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asBooleanByPython(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asBooleanByVertica(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asCharBytes(Object value, int length, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asDate(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asDouble(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asLong(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
asTimestamp(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
getBooleanEvaluation()
com.vertica.sdk.StandardTypeCoercion
getDateFormat()
com.vertica.sdk.StandardTypeCoercion
getDateParse()
com.vertica.sdk.StandardTypeCoercion
getDefaultDateFormat()
com.vertica.sdk.StandardTypeCoercion
getDefaultDateParse()
com.vertica.sdk.StandardTypeCoercion
getDefaultPolicy()
com.vertica.sdk.NoopTypeCoercion
protected
getDefaultTimestampFormat()
com.vertica.sdk.StandardTypeCoercion
getDefaultTimestampParse()
com.vertica.sdk.StandardTypeCoercion
getListIterator(Object value)
com.vertica.sdk.NoopTypeCoercion
getMapIterator(Object value)
com.vertica.sdk.NoopTypeCoercion
getMetaType(Object value)
com.vertica.sdk.NoopTypeCoercion
getPolicy()
com.vertica.sdk.NullTypeCoercion
getTimestampFormat()
com.vertica.sdk.StandardTypeCoercion
getTimestampParse()
com.vertica.sdk.StandardTypeCoercion
invalidInputType(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
protected
invalidInputValue(Object value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
protected
NullTypeCoercion()
com.vertica.sdk.NullTypeCoercion
parseDate(String value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
parseNumber(char[] text)
com.vertica.sdk.StandardTypeCoercion
protected
parseTimestamp(String value, VerticaType type)
com.vertica.sdk.StandardTypeCoercion
setBooleanEvaluation(BooleanEvaluation boolEval)
com.vertica.sdk.StandardTypeCoercion
setDateFormat(DateFormat fmt)
com.vertica.sdk.StandardTypeCoercion
setDateParse(DateFormat fmt)
com.vertica.sdk.StandardTypeCoercion
setPolicy(Collection< TypeCoercionPolicy > policy)
com.vertica.sdk.NullTypeCoercion
setTimestampFormat(DateFormat fmt)
com.vertica.sdk.StandardTypeCoercion
setTimestampParse(DateFormat fmt)
com.vertica.sdk.StandardTypeCoercion
StandardTypeCoercion()
com.vertica.sdk.StandardTypeCoercion
unsupportedType(Object value, VerticaType type)
com.vertica.sdk.NullTypeCoercion
protected
valueTooLarge(Object value, VerticaType type)
com.vertica.sdk.NoopTypeCoercion
protected
120 - com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation Enum Reference
Collaboration diagram for com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation:
Public Attributes
JAVA
PERL
PYTHON
VERTICA
Detailed Description
Choice of algorithm for handling coercion to Vertica's boolean type.
Member Data Documentation
◆ JAVA
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation.JAVA
use asBooleanByJava .
◆ PERL
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation.PERL
use asBooleanByPerl .
◆ PYTHON
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation.PYTHON
use asBooleanByPython .
◆ VERTICA
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation.VERTICA
use asBooleanByJava .
Referenced by com.vertica.sdk.StandardTypeCoercion.StandardTypeCoercion() .
121 - com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation Member List
This is the complete list of members for com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation , including all inherited members.
JAVA
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
NUMERIC enum value
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
PERL
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
PYTHON
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
VERTICA
com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
122 - com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal Class Reference
Collaboration diagram for com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal:
Public Member Functions
SpecialBigDecimal (BigDecimal val)
Public Attributes
final BigDecimal
bigDecimal
final boolean
isSpecial
final Double
special
Static Public Attributes
static final SpecialBigDecimal
NAN
static final SpecialBigDecimal
NEGATIVE_INFINITY
static final SpecialBigDecimal
POSITIVE_INFINITY
Detailed Description
Wraps a BigDecimal value such that NaN, +Infinity, and -Infinity can also be represented. This class does not have comparison or equality functionality. It's intended usage is only as a vehicle for the results of parseNumber.
When handling the result of StandardTypeCoercion#parseNumber(char[]), first check whether or not the result SpecialBigDecimal#isSpecial. If the result is special, then the value is either NaN, Infinity, or -Infinity. The value can be found in SpecialBigDecimal#special. Otherwise, the value can be found in SpecialBigDecimal#bigDecimal.
Constructor & Destructor Documentation
◆ SpecialBigDecimal()
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.SpecialBigDecimal(BigDecimal val)
Create a finite and real SpecialBigDecimal based on a BigDecimal value.
Parameters
Member Data Documentation
◆ NAN
final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.NAN
static
Initial value:
= new SpecialBigDecimal(Double.NaN)
Singleton NaN special value.
Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber() .
◆ NEGATIVE_INFINITY
final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.NEGATIVE_INFINITY
static
Initial value:
= new SpecialBigDecimal(Double.NEGATIVE_INFINITY)
Singleton -Infinity special value.
Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber() .
◆ POSITIVE_INFINITY
final SpecialBigDecimal com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal.POSITIVE_INFINITY
static
Initial value:
= new SpecialBigDecimal(Double.POSITIVE_INFINITY)
Singleton Infinity special value.
Referenced by com.vertica.sdk.StandardTypeCoercion.parseNumber() .
123 - com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal Member List
This is the complete list of members for com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal , including all inherited members.
bigDecimal (defined in com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal)
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
isSpecial (defined in com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal)
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
NAN
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
static
NEGATIVE_INFINITY
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
static
POSITIVE_INFINITY
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
static
special (defined in com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal)
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
SpecialBigDecimal(BigDecimal val)
com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
124 - com.vertica.sdk.State Class Reference
Collaboration diagram for com.vertica.sdk.State:
Classes
enum
InputState
enum
StreamState
125 - com.vertica.sdk.State.InputState Enum Reference
Collaboration diagram for com.vertica.sdk.State.InputState:
Public Member Functions
int
getCode ()
Public Attributes
END_OF_CHUNK =(2)
END_OF_FILE =(1)
OK =(0)
Detailed Description
InputState is used by input streams; namely, UDFilter and UDParser .
Member Function Documentation
◆ getCode()
int com.vertica.sdk.State.InputState.getCode()
Each Input State has a unique code, but that code is an internal implementation detail not intended to be used by UDX implementations.
Returns
code
Member Data Documentation
◆ END_OF_CHUNK
com.vertica.sdk.State.InputState.END_OF_CHUNK =(2)
Reached the end of an input chunk. Applies only to a parser and only when fed by a Chunker, it means the current data block ends on a record boundary. In this state a parser should consume all data in the block before returning from process.
Returning a StreamState of INPUT_NEEDED at this point is invalid, as there is no more input available for this parser.
◆ END_OF_FILE
com.vertica.sdk.State.InputState.END_OF_FILE =(1)
Reached the end of the input stream. No further data is available. Returning a StreamState of INPUT_NEEDED at this point is invalid, as there is no more input.
com.vertica.sdk.State.InputState.OK =(0)
Currently at the start of or in the middle of a stream.
126 - com.vertica.sdk.State.InputState Member List
This is the complete list of members for com.vertica.sdk.State.InputState , including all inherited members.
END_OF_CHUNK
com.vertica.sdk.State.InputState
END_OF_FILE
com.vertica.sdk.State.InputState
getCode()
com.vertica.sdk.State.InputState
OK
com.vertica.sdk.State.InputState
127 - com.vertica.sdk.State.StreamState Enum Reference
Collaboration diagram for com.vertica.sdk.State.StreamState:
Public Member Functions
int
getCode ()
Public Attributes
DONE =(2)
INPUT_NEEDED =(0)
KEEP_GOING =(4)
OUTPUT_NEEDED =(1)
REJECT =(3)
Detailed Description
StreamState indicates the state of a stream after process() has handled some input and some output data. See the UDSource , UDFilter , and UDParser classes for how these streams are used.
Member Data Documentation
◆ DONE
com.vertica.sdk.State.StreamState.DONE =(2)
The stream has completed; it will not be writing any more output nor consuming any more input.
Referenced by com.vertica.sdk.ContinuousUDParser.process() .
com.vertica.sdk.State.StreamState.INPUT_NEEDED =(0)
Indicates that a stream is unable to continue without being given more input. It may not have consumed all of its available input yet. It does not need to have consumed every byte of input. Not valid for output-only streams, ie., UDSources.
Referenced by com.vertica.sdk.ContinuousUDParser.process() .
◆ KEEP_GOING
com.vertica.sdk.State.StreamState.KEEP_GOING =(4)
Not commonly used; the stream has neither filled all of its output buffer nor consumed all of its input buffer, but would like to yield to the server. Typically it has neither consumed data nor produced data. This state should be used instead of a "wait" loop; a stream that is waiting for some external operation to complete should periodically return KEEP_GOING rather than simply blocking forever.
Referenced by com.vertica.sdk.ContinuousUDParser.process() .
◆ OUTPUT_NEEDED
com.vertica.sdk.State.StreamState.OUTPUT_NEEDED =(1)
Indicates that a stream is unable to write more output without being given a new or larger output buffer. Basically that it has "filled" the buffer as much as it is reasonably able to (which may be every byte full, some bytes full, even completely empty – in which case Vertica assumes that the UDL needs a larger buffer). Not valid for input-only streams, ie., UDParsers.
◆ REJECT
com.vertica.sdk.State.StreamState.REJECT =(3)
Only valid for UDParsers, indicates that the Parser has encountered an invalid entry that it cannot process. Parsers may reject exactly one row at a time.
See also
UDParser::getRejectedRecord()
Referenced by com.vertica.sdk.ContinuousUDParser.process() .
128 - com.vertica.sdk.State.StreamState Member List
This is the complete list of members for com.vertica.sdk.State.StreamState , including all inherited members.
DONE
com.vertica.sdk.State.StreamState
getCode() (defined in com.vertica.sdk.State.StreamState)
com.vertica.sdk.State.StreamState
INPUT_NEEDED
com.vertica.sdk.State.StreamState
KEEP_GOING
com.vertica.sdk.State.StreamState
OUTPUT_NEEDED
com.vertica.sdk.State.StreamState
REJECT
com.vertica.sdk.State.StreamState
129 - com.vertica.sdk.StreamWriter Class Reference
Inheritance diagram for com.vertica.sdk.StreamWriter:
Collaboration diagram for com.vertica.sdk.StreamWriter:
Public Member Functions
StreamWriter (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)
long
getTotalRowCount ()
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
long
cumulative_rows
ArrayList< Integer >
currentPos
Detailed Description
StreamWriter provides an iterator-based write interface over output data for a stream of blocks. Automatically makes space a block-at-a-time, as needed.
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
void com.vertica.sdk.PartitionWriter.copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx) throws UdfException
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.
Parameters
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)
◆ 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
◆ getDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.getDefaultTypeCoercion()
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 .
See also
#setRowFromMap(Map)
Returns
the current default TypeCoercion , creating one if necessary.
Referenced by
◆ 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.
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
inherited
Returns
information about the types and numbers of arguments
Referenced by
◆ getWriteableBlock()
abstract boolean com.vertica.sdk.StreamWriter.getWriteableBlock() throws UdfException, DestroyInvocation
abstract
Gets a writeable block of data and positions cursor at the beginning.
◆ setBooleanValue()
void com.vertica.sdk.PartitionWriter.setBooleanValue(int idx, Boolean value)
inherited
Set a Boolean value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDateValue()
void com.vertica.sdk.PartitionWriter.setDateValue(int idx, java.sql.Date value)
inherited
Set a Date value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setDefaultTypeCoercion()
TypeCoercion com.vertica.sdk.PartitionWriter.setDefaultTypeCoercion(TypeCoercion coerce)
inherited
Set the default type coercion instance.
See also
#setRowFromMap(Map)
Parameters
coerce: A TypeCoercion instance.
Returns
the former default, which may be null.
◆ setDoubleValue()
void com.vertica.sdk.PartitionWriter.setDoubleValue(int idx, Double value)
inherited
Set a Double value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setLongValue()
void com.vertica.sdk.PartitionWriter.setLongValue(int idx, Long value)
inherited
Set a Long value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setNumericValue()
void com.vertica.sdk.PartitionWriter.setNumericValue(int idx, BigDecimal value)
inherited
Set a Numeric value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setRowFromMap() [1/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData)
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.
Parameters
rowData: The data. Null data is treated as empty.
See also
#setRowFromMap(Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setRowFromMap() [2/2]
void com.vertica.sdk.PartitionWriter.setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
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).
Parameters
rowData: The data. Null data is treated as empty.
coerce: The implementation of coercion
See also
#setVMap(int, Map, TypeCoercion)
setValue(int, Object, TypeCoercion)
◆ setStringBytes()
void com.vertica.sdk.PartitionWriter.setStringBytes(int idx, ByteBuffer bytes)
inherited
Set a String value for column at index idx. Accepts null values.
Parameters
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.
Exceptions
IllegalArgumentException: if bytes is too long
◆ setStringValue()
void com.vertica.sdk.PartitionWriter.setStringValue(int idx, String value)
inherited
Set a String value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setTimestampValue()
void com.vertica.sdk.PartitionWriter.setTimestampValue(int idx, java.sql.Timestamp value)
inherited
Set a Timestamp value for column at index idx. Accepts null values.
Parameters
idx: column number
value: value to set it to
◆ setValue()
void com.vertica.sdk.PartitionWriter.setValue(int idx, Object value, TypeCoercion coerce)
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.
Bools
Integers (excluding Numeric)
Floats
String-like types (char and binary, along with var- and long variants)
Timestamp and timestamptz
Dates
Parameters
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() .
◆ setVMap() [1/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data)
inherited
Encodes a VMap into the given column, which must be of binary type.
Parameters
idx: The index of the binary or varbinary column.
data: The data. Null data is treated as empty.
See also
#setVMap(int, Map, TypeCoercion)
getDefaultTypeCoercion()
◆ setVMap() [2/2]
void com.vertica.sdk.PartitionWriter.setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
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.
Parameters
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.
See also
#setVMap(int, Map)
getDefaultTypeCoercion()
130 - com.vertica.sdk.StreamWriter Member List
This is the complete list of members for com.vertica.sdk.StreamWriter , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
blockSizeGivenRowSize(long row_size) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protectedstatic
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
copyFromInput(int dstIdx, PartitionReader input_reader, int srcIdx)
com.vertica.sdk.PartitionWriter
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
cumulative_rows (defined in com.vertica.sdk.StreamWriter)
com.vertica.sdk.StreamWriter
protected
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getDefaultTypeCoercion()
com.vertica.sdk.PartitionWriter
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getNumCols()
com.vertica.sdk.VerticaBlock
getNumericWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getRowSize(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
getStringWriter(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
getTotalRowCount() (defined in com.vertica.sdk.StreamWriter)
com.vertica.sdk.StreamWriter
getTypeMetaData()
com.vertica.sdk.VerticaBlock
getWriteableBlock()
com.vertica.sdk.StreamWriter
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
next() (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
PartitionWriter(int nargs) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
setBoolean(int idx, boolean r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setBooleanValue(int idx, Boolean value)
com.vertica.sdk.PartitionWriter
setDate(int idx, java.sql.Date r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDateValue(int idx, java.sql.Date value)
com.vertica.sdk.PartitionWriter
setDefaultTypeCoercion(TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setDouble(int idx, double r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setDoubleValue(int idx, Double value)
com.vertica.sdk.PartitionWriter
setLong(int idx, long r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setLongValue(int idx, Long value)
com.vertica.sdk.PartitionWriter
setNumeric(int idx, BigDecimal bd) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setNumericValue(int idx, BigDecimal value)
com.vertica.sdk.PartitionWriter
setRowCount(SizedColumnTypes types) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
protected
setRowFromMap(Map< String,?> rowData)
com.vertica.sdk.PartitionWriter
setRowFromMap(Map< String,?> rowData, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setString(int idx, String r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringBytes(int idx, ByteBuffer bytes)
com.vertica.sdk.PartitionWriter
setStringNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setStringValue(int idx, String value)
com.vertica.sdk.PartitionWriter
setTimestamp(int idx, java.sql.Timestamp r) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfiniteNeg(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampInfinitePos(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampNull(int idx) (defined in com.vertica.sdk.PartitionWriter)
com.vertica.sdk.PartitionWriter
setTimestampValue(int idx, java.sql.Timestamp value)
com.vertica.sdk.PartitionWriter
setValue(int idx, Object value, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data)
com.vertica.sdk.PartitionWriter
setVMap(int idx, Map< String,?> data, TypeCoercion coerce)
com.vertica.sdk.PartitionWriter
StreamWriter(int nargs) (defined in com.vertica.sdk.StreamWriter)
com.vertica.sdk.StreamWriter
throwInCorrectUsageError(int idx)
com.vertica.sdk.PartitionWriter
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
131 - com.vertica.sdk.StringUtils Class Reference
Collaboration diagram for com.vertica.sdk.StringUtils:
Static Public Member Functions
static ByteBuffer
duplicateBB (ByteBuffer buffer)
static Charset
getCharset ()
static ByteBuffer
getStringBytes (String value, int length, boolean removeTrailingSpaces)
static ByteBuffer
getStringBytes (String value, int length, boolean removeTrailingSpaces, boolean truncate)
static String
newString (ByteBuffer buffer)
static String
newString (ByteBuffer buffer, Charset charset)
static void
removeTruncatedUtf8CharBytes (ByteBuffer string)
static ByteBuffer
sliceBB (ByteBuffer buffer)
Detailed Description
A collection of string-related functions which assist in reading, generating, and handling Vertica string-like types. String-like types include:
char
varchar
long varchar
binary
varbinary
long varbinary
Member Function Documentation
◆ duplicateBB()
static ByteBuffer com.vertica.sdk.StringUtils.duplicateBB(ByteBuffer buffer)
static
A safer version of ByteBuffer#duplicate() that works around weird Java behavior. ByteBuffer#duplicate() does not apply the byte ordering of the source buffer to the duplicate buffer. This helper handles this. Otherwise it is identical.
Parameters
buffer: A non-null ByteBuffer.
Returns
a duplicate of the given buffer, sharing the same storage.
See also
Java bug 4715166
Referenced by
◆ getCharset()
static Charset com.vertica.sdk.StringUtils.getCharset()
static
Get the Charset used by Vertica. Required for any strings stored within or retrieved from Vertica.
Returns
The character set.
Referenced by
◆ getStringBytes() [1/2]
static ByteBuffer com.vertica.sdk.StringUtils.getStringBytes(String value, int length, boolean removeTrailingSpaces)
static
Correctly extract the bytes from a Java String in Vertica's character set. Does not perform truncation. Shorthand for:
getStringBytes(value, length, removeTrailingSpaces, false);
See also
getCharset()
Parameters
value: A non-null String (may be empty)
length: The maximum byte length of the destination, or -1 for no maximum.
removeTrailingSpaces: If true, trailing ASCII spaces will be excluded from the resulting byte sequence. This is proper behavior for Vertica's 'char' type.
Returns
a ByteBuffer with position and limit designating the start and end of the correct byte representation of the string. If truncation is not permitted and the value is too long, null will be returned.
Referenced by
◆ getStringBytes() [2/2]
static ByteBuffer com.vertica.sdk.StringUtils.getStringBytes(String value, int length, boolean removeTrailingSpaces, boolean truncate)
static
Correctly extract the bytes from a Java String in Vertica's character set. This ensures that the value fits within the designated byte length OR is properly truncated.
If truncation falls within a multi-byte character, additional bytes will be removed in order to ensure the contents are a valid string encoding. This can cause truncation to result in byte buffer that is shorter than length.
When applicable, trailing spaces are removed from the input string immediately as well as after truncation. Therefore, values that exceed the maximum length due to trailing spaces will not require truncation. Also, values that are truncated (if applicable) will have any remaining trailing spaces removed.
See also
getCharset()
Parameters
value: A non-null String (may be empty)
length: The maximum byte length of the destination, or -1 for no maximum.
removeTrailingSpaces: If true, trailing ASCII spaces will be excluded from the resulting byte sequence. This is proper behavior for Vertica's 'char' type.
truncate: If true, truncate values that are too long. If false, return null for values that are too long.
Returns
a ByteBuffer with position and limit designating the start and end of the correct byte representation of the string. If truncation is not permitted and the value is too long, null will be returned.
◆ newString() [1/2]
static String com.vertica.sdk.StringUtils.newString(ByteBuffer buffer)
static
Decode a String from the ByteBuffer using Vertica's charset. This is written to avoid unnecessary copies of the byte data. The buffer is not modified.
Parameters
buffer: The buffer with String bytes between its position and limit. The position and limit of the buffer is left unmodified. May not be null.
See also
getCharset()
Returns
a non-null String
◆ newString() [2/2]
static String com.vertica.sdk.StringUtils.newString(ByteBuffer buffer, Charset charset)
static
Decode a String from the ByteBuffer using the specified charset. The implementation avoids unnecessary copies of the byte data.
Parameters
buffer: The buffer with String bytes between its position and limit. The position and limit of the buffer is left unmodified. May not be null.
charset: The Charset to use when creating the new string from the source bytes.
Returns
a non-null String
◆ removeTruncatedUtf8CharBytes()
static void com.vertica.sdk.StringUtils.removeTruncatedUtf8CharBytes(ByteBuffer string)
static
Removes bytes at the end of a string encoded in Vertica's character set that are incomplete multi-byte characters. This scenario usually occurs due to truncation according to byte length which falls in the middle of a multi-byte character. This further truncation ensures the final string is valid in Vertica's encoding.
Parameters
string: A ByteBuffer representing a string in Vertica's encoding. The limit will be moved towards the position in order to drop partial multi-byte characters.
Referenced by com.vertica.sdk.StringUtils.getStringBytes() .
◆ sliceBB()
static ByteBuffer com.vertica.sdk.StringUtils.sliceBB(ByteBuffer buffer)
static
A safer version of ByteBuffer#slice() that works around weird Java behavior. ByteBuffer#slice() does not apply the byte ordering of the source buffer to the slice buffer. This helper handles this. Otherwise it is identical.
Parameters
buffer: A non-null ByteBuffer.
Returns
a view into the given buffer, sharing the same storage.
See also
Java bug 4715166
Referenced by
132 - com.vertica.sdk.StringUtils Member List
This is the complete list of members for com.vertica.sdk.StringUtils , including all inherited members.
duplicateBB(ByteBuffer buffer)
com.vertica.sdk.StringUtils
static
getCharset()
com.vertica.sdk.StringUtils
static
getStringBytes(String value, int length, boolean removeTrailingSpaces)
com.vertica.sdk.StringUtils
static
getStringBytes(String value, int length, boolean removeTrailingSpaces, boolean truncate)
com.vertica.sdk.StringUtils
static
newString(ByteBuffer buffer)
com.vertica.sdk.StringUtils
static
newString(ByteBuffer buffer, Charset charset)
com.vertica.sdk.StringUtils
static
removeTruncatedUtf8CharBytes(ByteBuffer string)
com.vertica.sdk.StringUtils
static
sliceBB(ByteBuffer buffer)
com.vertica.sdk.StringUtils
static
133 - com.vertica.sdk.TimestampUDxShared Class Reference
Collaboration diagram for com.vertica.sdk.TimestampUDxShared:
Static Public Member Functions
static String
describeIntervalTypeMod (int typemod)
static int
INTERVAL_MASK (int b)
static int
INTERVAL_PRECISION (int t)
static int
INTERVAL_RANGE (int t)
static int
TIMESTAMP_MASK (int b)
Static Public Attributes
static final int
INTERVAL_DAY2SECOND
static final int
INTERVAL_PRECISION_MASK = 0xFFFF
static final int
INTERVAL_RANGE_MASK = INTERVAL_YEAR2MONTH | INTERVAL_DAY2SECOND
static final int
INTERVAL_YEAR2MONTH = INTERVAL_MASK(DTtype.YEAR.getDTtype()) | INTERVAL_MASK(DTtype.MONTH.getDTtype())
static final int
MAX_SECONDS_PRECISION = 6
Member Data Documentation
◆ INTERVAL_DAY2SECOND
final int com.vertica.sdk.TimestampUDxShared.INTERVAL_DAY2SECOND
static
Initial value:
= INTERVAL_MASK(DTtype.DAY.getDTtype()) | INTERVAL_MASK(DTtype.HOUR.getDTtype() | INTERVAL_MASK(DTtype.MINUTE.getDTtype()) | INTERVAL_MASK(DTtype.SECOND.getDTtype()))
134 - com.vertica.sdk.TimestampUDxShared Member List
This is the complete list of members for com.vertica.sdk.TimestampUDxShared , including all inherited members.
describeIntervalTypeMod(int typemod) (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_DAY2SECOND (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_MASK(int b) (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_PRECISION(int t) (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_PRECISION_MASK (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_RANGE(int t) (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_RANGE_MASK (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
INTERVAL_YEAR2MONTH (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
MAX_SECONDS_PRECISION (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
TIMESTAMP_MASK(int b) (defined in com.vertica.sdk.TimestampUDxShared)
com.vertica.sdk.TimestampUDxShared
static
135 - com.vertica.sdk.TimestampUDxShared.DTtype Enum Reference
Collaboration diagram for com.vertica.sdk.TimestampUDxShared.DTtype:
Public Member Functions
int
getDTtype ()
Public Attributes
ADBC =(16)
AGO =(17)
AMPM =(9)
DAY =(3)
DOW =(14)
DOY =(13)
DTZ =(6)
DTZMOD =(7)
HOUR =(10)
IGNORE_DTF =(8)
ISODATE =(20)
ISOTIME =(21)
MINUTE =(11)
MONTH =(1)
NEG_INTERVAL =(4)
RESERV =(0)
SECOND =(12)
TZ =(5)
UNITS =(15)
UNKNOWN_FIELD =(31)
YEAR =(2)
136 - com.vertica.sdk.TimestampUDxShared.DTtype Member List
This is the complete list of members for com.vertica.sdk.TimestampUDxShared.DTtype , including all inherited members.
ADBC (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
AGO (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
AMPM (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
DAY (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
DOW (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
DOY (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
DTZ (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
DTZMOD (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
getDTtype() (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
HOUR (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
IGNORE_DTF (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
ISODATE (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
ISOTIME (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
MINUTE (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
MONTH (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
NEG_INTERVAL (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
RESERV (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
SECOND (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
TZ (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
UNITS (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
UNKNOWN_FIELD (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
YEAR (defined in com.vertica.sdk.TimestampUDxShared.DTtype)
com.vertica.sdk.TimestampUDxShared.DTtype
137 - com.vertica.sdk.TransformFunction Class Reference
Inheritance diagram for com.vertica.sdk.TransformFunction:
Collaboration diagram for com.vertica.sdk.TransformFunction:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
boolean
isCanceled ()
abstract void
processPartition (ServerInterface srvInterface, PartitionReader input_reader, PartitionWriter input_writer) throws UdfException, DestroyInvocation
void
setup (ServerInterface srvInterface, SizedColumnTypes argTypes)
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Interface for User-Defined Transform Function (UDTF). A UDTF operates on a table segment and returns zero or more rows of data.
UDTFs can only be used in the SELECT list of a query. UDTFs are cancelable.
A TransformFunction must have an associated TransformFunctionFactory .
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy() [1/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance destruction. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
Referenced by com.vertica.sdk.UDXFunction.destroy() .
◆ destroy() [2/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
inherited
Perform per instance destruction and write session parameters to be used by UDxs that are invoked after this one returns. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
udSessionParams: a SessionParamWriterMap
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ processPartition()
abstract void com.vertica.sdk.TransformFunction.processPartition(ServerInterface srvInterface, PartitionReader input_reader, PartitionWriter input_writer) throws UdfException, DestroyInvocation
abstract
Invoke a user defined transform on a set of rows. As the name suggests, a batch of rows are passed in for every invocation to amortize performance.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
input_reader: input rows
input_writer: output location
Exceptions
UdfException: UDF problem
DestroyInvocation: vertica canceling – do not catch or handle
◆ setup()
void com.vertica.sdk.UDXFunction.setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
inherited
Perform per instance initialization. This function may throw errors.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
138 - com.vertica.sdk.TransformFunction Member List
This is the complete list of members for com.vertica.sdk.TransformFunction , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
com.vertica.sdk.UDXFunction
isCanceled()
com.vertica.sdk.UDXObject
processPartition(ServerInterface srvInterface, PartitionReader input_reader, PartitionWriter input_writer)
com.vertica.sdk.TransformFunction
setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
139 - com.vertica.sdk.TransformFunctionFactory Class Reference
Inheritance diagram for com.vertica.sdk.TransformFunctionFactory:
Collaboration diagram for com.vertica.sdk.TransformFunctionFactory:
Public Member Functions
abstract TransformFunction
createTransformFunction (ServerInterface srvInterface)
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
abstract void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstract void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
UDXType
getUDXFactoryType ()
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Interface for declaring parameters and return types for, and instantiating, an associated TransformFunction .
Member Function Documentation
abstract TransformFunction com.vertica.sdk.TransformFunctionFactory.createTransformFunction(ServerInterface srvInterface)
abstract
Called when Vertica needs a new TransformFunction object to process a UDTF function call.
Note
More than one object may be instantiated per query.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
an TransformFunction object which implements the UDx API described by this metadata.
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources() [1/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources() .
◆ getPerInstanceResources() [2/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
inherited
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
abstract void com.vertica.sdk.UDXFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstractinherited
Provides the argument and return types of the UDX
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments
returnType: the type(s) of the return
Referenced by com.vertica.sdk.ScalarFunctionFactory.getReturnType() .
◆ getReturnType()
abstract void com.vertica.sdk.UDXFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
abstractinherited
Function to tell Vertica what the return types (and length/precision if necessary) of this UDX are.
For CHAR/VARCHAR types, specify the max length,
For NUMERIC types, specify the precision and scale.
For Time types (with or without time zone), specify the precision, -1 means unspecified/don't care
For IntervalYM/IntervalDS types, specify the precision and range
For all other types, no length/precision specification needed
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: Provides the data types of arguments that this UDT was called with. This may be used to modify the return types accordingly.
returnType: User code must fill in the names and data types returned by the UDT.
◆ getUDXFactoryType()
UDXType com.vertica.sdk.TransformFunctionFactory.getUDXFactoryType()
Returns
the object type internally used by Vertica
140 - com.vertica.sdk.TransformFunctionFactory Member List
This is the complete list of members for com.vertica.sdk.TransformFunctionFactory , including all inherited members.
createTransformFunction(ServerInterface srvInterface)
com.vertica.sdk.TransformFunctionFactory
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDXFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDXFactory
getUDXFactoryType()
com.vertica.sdk.TransformFunctionFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
141 - com.vertica.sdk.TransformFunctionPhase Class Reference
Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function.
Collaboration diagram for com.vertica.sdk.TransformFunctionPhase:
Public Member Functions
abstract TransformFunction
createTransformFunction (ServerInterface srvInterface)
abstract void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnTypes)
boolean
isPrepass ()
void
setPrepass ()
Detailed Description
Interface to provide compile-time information for a single phase of a multi-phase user-defined transform function.
Note that even though this class shares some methods with TransformFunctionFactory , it is explicitly not a subclass (because it is incorrect to implement a getPrototype() method for this class).
Member Function Documentation
abstract TransformFunction com.vertica.sdk.TransformFunctionPhase.createTransformFunction(ServerInterface srvInterface)
abstract
Called when Vertica needs a new TransformFunction object to process this phase of a multi-phase UDT.
Note
More than one object may be instantiated per query.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
a TransformFunction object which implements the UDx API described by this metadata.
◆ getReturnType()
abstract void com.vertica.sdk.TransformFunctionPhase.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnTypes)
abstract
Function to tell Vertica what the return types (and length/precision if necessary) and partition-by, order-by of this phase are.
For CHAR/VARCHAR types, specify the max length,
For NUMERIC types, specify the precision and scale.
For Time/Timestamp types (with or without time zone), specify the precision, -1 means unspecified/don't care
For IntervalYM/IntervalDS types, specify the precision and range
For all other types, no length/precision specification needed
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: Provides the data types of arguments that this phase was called with, along with partition and order information. This may be used to modify the return types accordingly.
returnTypes: User code must fill in the names and data types returned by this phase, along with the partition-by and order-by column information (if any).
142 - com.vertica.sdk.TransformFunctionPhase Member List
This is the complete list of members for com.vertica.sdk.TransformFunctionPhase , including all inherited members.
createTransformFunction(ServerInterface srvInterface)
com.vertica.sdk.TransformFunctionPhase
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnTypes)
com.vertica.sdk.TransformFunctionPhase
isPrepass() (defined in com.vertica.sdk.TransformFunctionPhase)
com.vertica.sdk.TransformFunctionPhase
setPrepass() (defined in com.vertica.sdk.TransformFunctionPhase)
com.vertica.sdk.TransformFunctionPhase
TransformFunctionPhase() (defined in com.vertica.sdk.TransformFunctionPhase)
com.vertica.sdk.TransformFunctionPhase
143 - com.vertica.sdk.TypeCoercion Interface Reference
Inheritance diagram for com.vertica.sdk.TypeCoercion:
Collaboration diagram for com.vertica.sdk.TypeCoercion:
Public Member Functions
ByteBuffer
asBinaryBytes (Object value, int length, VerticaType type)
Boolean
asBoolean (Object value, VerticaType type)
ByteBuffer
asCharBytes (Object value, int length, VerticaType type)
java.sql.Date
asDate (Object value, VerticaType type)
Double
asDouble (Object value, VerticaType type)
Long
asLong (Object value, VerticaType type)
java.sql.Timestamp
asTimestamp (Object value, VerticaType type)
Iterator< Object >
getListIterator (Object value)
Iterator< Map.Entry< String, Object > >
getMapIterator (Object value)
MetaType
getMetaType (Object value)
Set< TypeCoercionPolicy >
getPolicy ()
void
setPolicy (Collection< TypeCoercionPolicy > policy)
Detailed Description
An interface which allows for intelligent casting from arbitrary Java Objects to appropriate types for consumption by Vertica. Several default implementations are provided, including:
Member Function Documentation
◆ asBinaryBytes()
ByteBuffer com.vertica.sdk.TypeCoercion.asBinaryBytes(Object value, int length, VerticaType type)
Coerce a value to bytes. May return null, which is different than an empty array.
Note that the 'binary' type should be padded out to the full length.
Parameters
value: The value being coerced.
length: The length of the string-like type.
type: The target Vertica type, which is a string-like type.
Returns
a ByteBuffer with no more than 'length' bytes between its position and limit.
Implemented in com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asBoolean()
Boolean com.vertica.sdk.TypeCoercion.asBoolean(Object value, VerticaType type)
Coerce a value to a Boolean. May return null.
Parameters
value: The value being coerced.
type: The target Vertica type, which is boolean.
Returns
An appropriate Boolean value, or null.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asCharBytes()
ByteBuffer com.vertica.sdk.TypeCoercion.asCharBytes(Object value, int length, VerticaType type)
Coerce a value to vertica-encoded string bytes. May return null, which is different than the empty string.
Note that the 'char' type should have trailing ASCII spaces removed. To implement this behavior, inspect the type parameter with VerticaType#isChar() .
Parameters
value: The value to convert, which may be null.
length: The maximum length (in bytes) of the result.
type: The target Vertica type, which is some string-like type.
See also
StringUtils::getStringBytes(String, int, boolean)
StringUtils::getStringBytes(String, int, boolean, boolean)
StringUtils::getCharset()
VerticaType::isChar()
Returns
A ByteBuffer with no more than 'length' bytes between its position and limit.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asDate()
java.sql.Date com.vertica.sdk.TypeCoercion.asDate(Object value, VerticaType type)
Coerce a value to a Date. May return null.
Note that the java.sql.Date specification requires that the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.
However, that is not required by the Vertica SDK. This 'normalization' will take place later by internal components of the SDK.
Parameters
value: The value being coerced.
type: The target Vertica type.
Returns
An appropriate Timestamp value, or null.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asDouble()
Double com.vertica.sdk.TypeCoercion.asDouble(Object value, VerticaType type)
Coerce a value to a Double. May return null.
Parameters
value: The value being coerced.
type: The target Vertica type.
Returns
An appropriate Double value, or null.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asLong()
Long com.vertica.sdk.TypeCoercion.asLong(Object value, VerticaType type)
Coerce a value to a Long. May return null.
Parameters
value: The value being coerced.
type: The target Vertica type.
Returns
An appropriate Long value, or null.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ asTimestamp()
java.sql.Timestamp com.vertica.sdk.TypeCoercion.asTimestamp(Object value, VerticaType type)
Coerce a value to a Timestamp. May return null. This is used for timestamp and timestamptz Vertica types.
The timestamp is assumed to represent a moment in the UTC timezone, which is how Vertica stores all timestamp and timestamptz values internally. Implementations should handle any translations related to timezones.
Vertica has microsecond precision for timestamp values. Any further precision on the returned value is ignored.
Parameters
value: The value being coerced.
type: The target Vertica type.
Returns
An appropriate Timestamp value, or null.
Implemented in com.vertica.sdk.StandardTypeCoercion , com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ getListIterator()
Iterator<Object> com.vertica.sdk.TypeCoercion.getListIterator(Object value)
Get an iterator of values from some list-like aggregate value. This is only invoked for values which getMetaType(Object) has returned MetaType#LIST .
Parameters
value: A value that was previously identified as list-like type.
Returns
An iterator over Objects. Not null.
Implemented in com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ getMapIterator()
Iterator<Map.Entry<String,Object> > com.vertica.sdk.TypeCoercion.getMapIterator(Object value)
Get an iterator of values from some map-like aggregate value. This is only invoked for values which getMetaType(Object) has returned MetaType#MAP .
The elements must have only String keys. Otherwise a ClassCastException will be raised at a later time.
Parameters
value: A value that was previously identified as map-like type.
Returns
An iterator over Map.Entry<String,Object>. Not null.
Implemented in com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
MetaType com.vertica.sdk.TypeCoercion.getMetaType(Object value)
Determine what genre of type the given value is. This is used when handling aggregate data structures which may include nesting of other aggregate or non-aggregate types.
The response indicates if the given value is a scalar, list, or map type. Alternatively, a response of SKIP indicates that the value should be ignored, as if it did not exist.
Parameters
value: The value of interest, which may be null.
Returns
The type of the value.
See also
MetaType
Implemented in com.vertica.sdk.NoopTypeCoercion , and com.vertica.sdk.NullTypeCoercion .
◆ getPolicy()
Set<TypeCoercionPolicy> com.vertica.sdk.TypeCoercion.getPolicy()
Returns an unmodifiable version of the policy.
Returns
The policy collection.
See also
setPolicy
Implemented in com.vertica.sdk.NullTypeCoercion .
◆ setPolicy()
void com.vertica.sdk.TypeCoercion.setPolicy(Collection< TypeCoercionPolicy > policy)
Sets the policies for this TypeCoercion instance. Policies generally dictate which scenarios generate exceptions and allow for different error handling choices without implementing a new TypeCoercion class.
Parameters
policy: The policy collection
See also
TypeCoercionPolicy
getPolicy()
Implemented in com.vertica.sdk.NullTypeCoercion .
144 - com.vertica.sdk.TypeCoercion Member List
This is the complete list of members for com.vertica.sdk.TypeCoercion , including all inherited members.
asBinaryBytes(Object value, int length, VerticaType type)
com.vertica.sdk.TypeCoercion
asBoolean(Object value, VerticaType type)
com.vertica.sdk.TypeCoercion
asCharBytes(Object value, int length, VerticaType type)
com.vertica.sdk.TypeCoercion
asDate(Object value, VerticaType type)
com.vertica.sdk.TypeCoercion
asDouble(Object value, VerticaType type)
com.vertica.sdk.TypeCoercion
asLong(Object value, VerticaType type)
com.vertica.sdk.TypeCoercion
asTimestamp(Object value, VerticaType type)
com.vertica.sdk.TypeCoercion
getListIterator(Object value)
com.vertica.sdk.TypeCoercion
getMapIterator(Object value)
com.vertica.sdk.TypeCoercion
getMetaType(Object value)
com.vertica.sdk.TypeCoercion
getPolicy()
com.vertica.sdk.TypeCoercion
setPolicy(Collection< TypeCoercionPolicy > policy)
com.vertica.sdk.TypeCoercion
145 - com.vertica.sdk.TypeCoercion.MetaType Enum Reference
Collaboration diagram for com.vertica.sdk.TypeCoercion.MetaType:
Public Attributes
LIST
SCALAR
SKIP
Detailed Description
The possible meta-types of any given value.
See also
TypeCoercion::getMetaType(Object)
Member Data Documentation
◆ LIST
com.vertica.sdk.TypeCoercion.MetaType.LIST
This value is a list of values.
Referenced by com.vertica.sdk.NoopTypeCoercion.getMetaType() .
◆ SCALAR
com.vertica.sdk.TypeCoercion.MetaType.SCALAR
This value is a scalar value.
Referenced by
◆ SKIP
com.vertica.sdk.TypeCoercion.MetaType.SKIP
Ignore the value, as if it did not exist.
146 - com.vertica.sdk.TypeCoercion.MetaType Member List
This is the complete list of members for com.vertica.sdk.TypeCoercion.MetaType , including all inherited members.
LIST
com.vertica.sdk.TypeCoercion.MetaType
MAP enum value
com.vertica.sdk.TypeCoercion.MetaType
SCALAR
com.vertica.sdk.TypeCoercion.MetaType
SKIP
com.vertica.sdk.TypeCoercion.MetaType
147 - com.vertica.sdk.TypeCoercionException Class Reference
Inheritance diagram for com.vertica.sdk.TypeCoercionException:
Collaboration diagram for com.vertica.sdk.TypeCoercionException:
Public Member Functions
TypeCoercionException ()
TypeCoercionException (Object value, VerticaType type, TypeCoercionPolicy policyViolated)
TypeCoercionPolicy
getPolicy ()
VerticaType
getType ()
Object
getValue ()
Detailed Description
Indicates that a given object value could not be coerced to a particular VerticaType .
Constructor & Destructor Documentation
◆ TypeCoercionException() [1/2]
com.vertica.sdk.TypeCoercionException.TypeCoercionException()
A new empty exception.
◆ TypeCoercionException() [2/2]
com.vertica.sdk.TypeCoercionException.TypeCoercionException(Object value, VerticaType type, TypeCoercionPolicy policyViolated)
A TypeCoercion exception generated by attempting to coerce value to type, but failed due to policyViolated.
Parameters
value: The value being coerced.
type: The target Vertica type.
policyViolated: The policy that caused the error.
Member Function Documentation
◆ getPolicy()
TypeCoercionPolicy com.vertica.sdk.TypeCoercionException.getPolicy()
Get the policy which was violated
Returns
The policy that caused the exception.
◆ getType()
VerticaType com.vertica.sdk.TypeCoercionException.getType()
Get the VerticaType
Returns
The target Vertica type.
◆ getValue()
Object com.vertica.sdk.TypeCoercionException.getValue()
Get the value that caused the exception.
Returns
The value being coerced.
148 - com.vertica.sdk.TypeCoercionException Member List
This is the complete list of members for com.vertica.sdk.TypeCoercionException , including all inherited members.
getPolicy()
com.vertica.sdk.TypeCoercionException
getType()
com.vertica.sdk.TypeCoercionException
getValue()
com.vertica.sdk.TypeCoercionException
TypeCoercionException()
com.vertica.sdk.TypeCoercionException
TypeCoercionException(Object value, VerticaType type, TypeCoercionPolicy policyViolated)
com.vertica.sdk.TypeCoercionException
149 - com.vertica.sdk.TypeCoercionPolicy Enum Reference
Collaboration diagram for com.vertica.sdk.TypeCoercionPolicy:
Public Member Functions
TypeCoercionPolicy (String errorReason)
String
getErrorReason ()
Public Attributes
FAIL_INVALID_INPUT_TYPE
FAIL_INVALID_INPUT_VALUE
FAIL_SDK_UNSUPPORTED_TYPE
FAIL_UNSUPPORTED_TYPE
TRUNCATE_VALUES
Detailed Description
A collection of optional policy choices for TypeCoercion instances. These represent common choices that can be enabled or disabled for a given TypeCoercion instance.
Member Data Documentation
com.vertica.sdk.TypeCoercionPolicy.FAIL_INVALID_INPUT_TYPE
Initial value:
=( "The input type cannot be coerced to the target type")
Consider invalid input types as failures.
Referenced by com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy() .
com.vertica.sdk.TypeCoercionPolicy.FAIL_INVALID_INPUT_VALUE
Initial value:
=( "The input value cannot be coerced to the target type")
Consider invalid input values (of valid input type) as failures.
Referenced by com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy() .
◆ FAIL_SDK_UNSUPPORTED_TYPE
com.vertica.sdk.TypeCoercionPolicy.FAIL_SDK_UNSUPPORTED_TYPE
Initial value:
=( "The target type is unsupported by the Vertica Java SDK")
Consider target types that are unsupported by the Vertica Java SDK as failures.
Referenced by com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy() .
◆ FAIL_UNSUPPORTED_TYPE
com.vertica.sdk.TypeCoercionPolicy.FAIL_UNSUPPORTED_TYPE
Initial value:
=( "Unsupported target type")
Consider types that are unsupported by TypeCoercion as failures. See FAIL_SDK_UNSUPPORTED_TYPE for types not supported by the Vertica SDK.
Referenced by com.vertica.sdk.NoopTypeCoercion.getDefaultPolicy() .
◆ TRUNCATE_VALUES
com.vertica.sdk.TypeCoercionPolicy.TRUNCATE_VALUES
Initial value:
=( "The input value is too large for the target type")
Values that are too large for the target type should be truncated. Otherwise, they are treated as invalid input values and handled according to FAIL_INVALID_INPUT_VALUE .
150 - com.vertica.sdk.TypeCoercionPolicy Member List
This is the complete list of members for com.vertica.sdk.TypeCoercionPolicy , including all inherited members.
FAIL_INVALID_INPUT_TYPE
com.vertica.sdk.TypeCoercionPolicy
FAIL_INVALID_INPUT_VALUE
com.vertica.sdk.TypeCoercionPolicy
FAIL_SDK_UNSUPPORTED_TYPE
com.vertica.sdk.TypeCoercionPolicy
FAIL_UNSUPPORTED_TYPE
com.vertica.sdk.TypeCoercionPolicy
getErrorReason() (defined in com.vertica.sdk.TypeCoercionPolicy)
com.vertica.sdk.TypeCoercionPolicy
TRUNCATE_VALUES
com.vertica.sdk.TypeCoercionPolicy
TypeCoercionPolicy(String errorReason) (defined in com.vertica.sdk.TypeCoercionPolicy)
com.vertica.sdk.TypeCoercionPolicy
151 - com.vertica.sdk.UdfException Class Reference
Inheritance diagram for com.vertica.sdk.UdfException:
Collaboration diagram for com.vertica.sdk.UdfException:
Public Member Functions
UdfException (int errorcode, Throwable causedBy)
UdfException (int errorcode, String message, Throwable causedBy)
UdfException (int errorcode, String message)
Public Attributes
int
errorcode
Detailed Description
Contains error information, UDx code can throw object of this class to Vertica to indicate an error
Constructor & Destructor Documentation
◆ UdfException() [1/3]
com.vertica.sdk.UdfException.UdfException(int errorcode, Throwable causedBy)
Constructor
Parameters
errorcode: a numeric id that UDx can use to indicate the error.
causedBy: an uncaught Throwable that caused the UDF to fail
◆ UdfException() [2/3]
com.vertica.sdk.UdfException.UdfException(int errorcode, String message, Throwable causedBy)
Constructor
Parameters
errorcode: a numeric id that UDx can use to indicate the error.
message: a human readable error message
causedBy: an uncaught Throwable that caused the UDF to fail
◆ UdfException() [3/3]
com.vertica.sdk.UdfException.UdfException(int errorcode, String message)
Constructor
Parameters
errorcode: a numeric id that UDx can use to indicate the error.
message: a human readable error message.
152 - com.vertica.sdk.UdfException Member List
This is the complete list of members for com.vertica.sdk.UdfException , including all inherited members.
errorcode (defined in com.vertica.sdk.UdfException)
com.vertica.sdk.UdfException
UdfException(int errorcode, Throwable causedBy)
com.vertica.sdk.UdfException
UdfException(int errorcode, String message, Throwable causedBy)
com.vertica.sdk.UdfException
UdfException(int errorcode, String message)
com.vertica.sdk.UdfException
153 - com.vertica.sdk.UDFilter Class Reference
Inheritance diagram for com.vertica.sdk.UDFilter:
Collaboration diagram for com.vertica.sdk.UDFilter:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface) throws UdfException
void
destroy (ServerInterface srvInterface, SessionParamWriterMap udSessionParams) throws UdfException
boolean
isCanceled ()
abstract StreamState
process (ServerInterface srvInterface, DataBuffer input, InputState input_state, DataBuffer output) throws UdfException
void
setup (ServerInterface srvInterface) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Reads input data from a UDSource or another UDFilter and transforms it.
For example, a UDFilter might unzip a file, convert UTF-16 to UTF-8, or remove personally identifying information such as social security numbers. UDFilters can be chained, for example unzipping, converting encodings, and then stripping personal information. The first UDFilter in a chain receives its input from a UDSource , and the output of the last one in the chain is sent to a UDParser .
UDFilter is part of the load pipeline. The load pipeline consists of up to one UDSource , any number of UDFilters, and up to one UDParser .
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy()
void com.vertica.sdk.UDFilter.destroy(ServerInterface srvInterface) throws UdfException
UDFilter::destroy()
Will be invoked during query execution, after the last time that process() is called on this UDFilter instance for a particular input file.
May write UD Session Parameters for namespaces public and library May optionally be overridden to perform tear-down/destruction.
See UDFilter::setup() for a note about the restartability of UDFilters.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Exceptions
UdfException: UDF problem
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ process()
abstract StreamState com.vertica.sdk.UDFilter.process(ServerInterface srvInterface, DataBuffer input, InputState input_state, DataBuffer output) throws UdfException
abstract
UDFilter::process()
Will be invoked repeatedly during query execution, until it returns DONE or until the query is canceled by the user.
On each invocation, process() is handed some input data and a buffer to write output data into. It is expected to read and process some amount of the input data, write some amount of output data, and return a value that informs Vertica what needs to happen next.
process() must set input.offset to the number of bytes that were successfully read from the input buffer, and that will not need to be re-consumed by a subsequent invocation of process() . This may not be larger than input.size. (input.size is the size of the buffer.) If it is set to 0, this indicates that process() cannot process any part of an input buffer of this size, and requires more data per invocation. (For example, a block-based decompression algorithm might return 0 if the input buffer does not contain a complete block.)
Note that input may contain null bytes, if the source file contains null bytes. Note also that input is NOT automatically null-terminated.
If input_state == END_OF_FILE, then the last byte in input is the last byte in the input stream. Returning INPUT_NEEDED will not result in any new input appearing. process() should return DONE in this case as soon as this operator has finished producing all output that it is going to produce.
process() must set output.offset to the number of bytes that were written to the output buffer. This may not be larger than output.size. If it is set to 0, this indicates that process() requires a larger output buffer.
Note that, unless OUTPUT_NEEDED is returned, output will be UNMODIFIED the next time process() is called. This means that pointers into the buffer will continue to be valid. It also means that output.offset may be set. So, in general, process() code should assume that buffers start at output.buf[output.offset]. The same goes for input and INPUT_NEEDED. Note also that, as a performance optimization, upstream operators may start processing emitted data (data between output.buf[0] and output.buf[output.offset]) before OUTPUT_NEEDED is returned. For this reason, output.offset must be strictly increasing.
process() must not block indefinitely. If it cannot proceed for an extended period of time, it should return KEEP_GOING. It will be called again shortly. Failure to do this will, among other things, prevent the query from being canceled by the user.
Note that it is UNSAFE to maintain pointers or references to any of these arguments (or any other argument passed by reference into any other function in this API) beyond the scope of the function call in question. For example, do not store a reference to the server interface or the input block on an instance variable. Vertica may free and replace these objects.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
input: DataBuffer for input
input_state: InputState
output: DataBuffer for output
Returns
OUTPUT_NEEDED if this UDFilter has more data to produce; INPUT_NEEDED if it needs more data to continue working; DONE if has no more data to produce.
Exceptions
UdfException: UDF problem
◆ setup()
void com.vertica.sdk.UDFilter.setup(ServerInterface srvInterface) throws UdfException
UDFilter::setup()
Will be invoked during query execution, prior to the first time that process() is called on this UDFilter instance for a particular input file.
May optionally be overridden to perform setup/initialzation.
Note that UDFilters MUST BE RESTARTABLE! If loading large numbers of files, a given UDFilter may be re-used for multiple files. Vertica follows the worker-pool design pattern: At the start of COPY execution, several Parsers and several Filters are instantiated per node, by calling the corresponding prepare() method multiple times. Each Filter/Parser pair is then internally assigned to an initial Source (UDSource or internal). At that point, setup() is called; then process() is called until it is finished; then destroy() is called. If there are still sources in the pool waiting to be processed, then the UDFilter/UDSource pair will be given a second Source; setup() will be called a second time, then process() until it is finished, then destroy() . This repeats until all sources have been read.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Exceptions
UdfException: UDF problem
154 - com.vertica.sdk.UDFilter Member List
This is the complete list of members for com.vertica.sdk.UDFilter , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface)
com.vertica.sdk.UDFilter
destroy(ServerInterface srvInterface, SessionParamWriterMap udSessionParams) (defined in com.vertica.sdk.UDFilter)
com.vertica.sdk.UDFilter
isCanceled()
com.vertica.sdk.UDXObject
process(ServerInterface srvInterface, DataBuffer input, InputState input_state, DataBuffer output)
com.vertica.sdk.UDFilter
setup(ServerInterface srvInterface)
com.vertica.sdk.UDFilter
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
155 - com.vertica.sdk.UDLFactory Class Reference
Inheritance diagram for com.vertica.sdk.UDLFactory:
Collaboration diagram for com.vertica.sdk.UDLFactory:
Public Member Functions
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
abstract UDXType
getUDXFactoryType ()
Protected Attributes
long
libOid
String
sqlName
Member Function Documentation
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
inherited
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources()
void com.vertica.sdk.UDLFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
void com.vertica.sdk.UDLFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
Provides the argument and return types of the UDL. UDL's take no input tuples; as such, their prototype is empty.
◆ getReturnType()
void com.vertica.sdk.UDLFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
Not used in this form
◆ getUDXFactoryType()
abstract UDXType com.vertica.sdk.UDXFactory.getUDXFactoryType()
abstractinherited
User subclasses should use the appropriate subclass of UDXFactory and not override this method on their own.
Returns
the type of UDX Object instance this factory returns.
156 - com.vertica.sdk.UDLFactory Member List
This is the complete list of members for com.vertica.sdk.UDLFactory , including all inherited members.
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res) (defined in com.vertica.sdk.UDLFactory)
com.vertica.sdk.UDLFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDLFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDLFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDLFactory
getUDXFactoryType()
com.vertica.sdk.UDXFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
157 - com.vertica.sdk.UDParser Class Reference
Inheritance diagram for com.vertica.sdk.UDParser:
Collaboration diagram for com.vertica.sdk.UDParser:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, SizedColumnTypes returnType) throws UdfException
void
destroy (ServerInterface srvInterface, SizedColumnTypes returnType, SessionParamWriterMap udSessionParams) throws UdfException
int
getRecordsAcceptedInBatch ()
RejectedRecord
getRejectedRecord () throws UdfException
boolean
getSeenEOB ()
StreamWriter
getStreamWriter ()
void
increRecordsAcceptedInBatch ()
boolean
isCanceled ()
abstract StreamState
process (ServerInterface srvInterface, DataBuffer input, InputState input_state) throws UdfException, DestroyInvocation
void
setRecordsAcceptedInBatch (int i)
void
setSeenEOB (Boolean b)
void
setStreamWriter (StreamWriter writer)
void
setup (ServerInterface srvInterface, SizedColumnTypes returnType) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Protected Attributes
int
recordsAcceptedInBatch
boolean
seen_eob
StreamWriter
writer
Detailed Description
Parses an input stream into Vertica tuples (rows to be inserted into a table).
A UDParser can be used with up to one UDSource and any number of UDfilters.
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy()
void com.vertica.sdk.UDParser.destroy(ServerInterface srvInterface, SizedColumnTypes returnType) throws UdfException
UDParser::destroy()
Will be invoked during query execution, after the last time that process() is called on this UDParser instance for a particular input file.
May write UD Session Parameters for namespaces public and library
May optionally be overridden to perform tear-down/destruction.
See UDParser::setup() for a note about the restartability of UDParsers.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
returnType: the type of the return
Exceptions
UdfException: UDF problem
◆ getRejectedRecord()
RejectedRecord com.vertica.sdk.UDParser.getRejectedRecord() throws UdfException
Returns information about the rejected record
Returns
a rejected record
Exceptions
UdfException: UDF problem
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ process()
abstract StreamState com.vertica.sdk.UDParser.process(ServerInterface srvInterface, DataBuffer input, InputState input_state) throws UdfException, DestroyInvocation
abstract
UDParser::prepareToCooperate()
Notification to this parser that it should prepare to share parsing input with another. This can only happen when a parser has an associated chunker. Default implementation does nothing. UDParser::isReadyToCooperate()
Called after UDParser::prepareToCooperate(), returns false if this parser is not yet ready to cooperate. Once this method returns true the parser can begin to cooperate. Default implementation returns true, override if some preparation is required before the parser can cooperate (e.g. a certain # of rows must be skipped). UDParser::process()
Will be invoked repeatedly during query execution, until it returns DONE or until the query is canceled by the user.
On each invocation, process() will be given an input buffer. It should read data from that buffer, converting it to fields and tuples and writing those tuples via writer. Once it has consumed as much as it reasonably can (for example, once it has consumed the last complete row in the input buffer), it should return INPUT_NEEDED to indicate that more data is needed, or DONE to indicate that it has completed parsing this input stream and will not be reading more bytes from it.
If input_state == END_OF_FILE, then the last byte in input is the last byte in the input stream. Returning INPUT_NEEDED will not result in any new input appearing. process() should return DONE in this case as soon as this operator has finished producing all output that it is going to produce.
Note that input may contain null bytes, if the source file contains null bytes. Note also that input is NOT automatically null-terminated.
process() must not block indefinitely. If it cannot proceed for an extended period of time, it should return KEEP_GOING. It will be called again shortly. Failure to do this will, among other things, prevent the query from being canceled by the user.
Note that, unless INPUT_NEEDED is returned, input will be UNMODIFIED the next time process() is called. This means that pointers into the buffer will continue to be valid. It also means that input.offset may be set. So, in general, process() code should assume that buffers start at input.buf[input.offset].
Row Rejection
process() can "reject" a row, causing it to be logged by Vertica's rejected-rows mechanism. Rejected rows should not be emitted as tuples. A rejected row must start at the first byte of input (meaning all previous input must have been consumed by a previous call to process() ). To reject a row, set input.offset to the size of the row, and return REJECT.
Returns
INPUT_NEEDED if this UDParser has more data to produce; DONE if has no more data to produce; REJECT to reject a row
Note that it is UNSAFE to maintain pointers or references to any of these arguments (or any other argument passed by reference into any other function in this API) beyond the scope of the function call in question. For example, do not store a reference to the server interface or the input block on an instance variable. Vertica may free and replace these objects.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
input: input data buffer
input_state: input state
Exceptions
UdfException: UDF problem
DestroyInvocation: Invocation needed to be destroyed
◆ setup()
void com.vertica.sdk.UDParser.setup(ServerInterface srvInterface, SizedColumnTypes returnType) throws UdfException
UDParser::setup()
Will be invoked during query execution, prior to the first time that process() is called on this UDParser instance for a particular input source.
May optionally be overridden to perform setup/initialization.
Note that UDParsers MUST BE RESTARTABLE! If loading large numbers of files, a given UDParsers may be re-used for multiple files. Vertica follows the worker-pool design pattern: At the start of COPY execution, several Parsers and several Filters are instantiated per node, by calling the corresponding prepare() method multiple times. Each Filter/Parser pair is then internally assigned to an initial Source (UDSource or internal). At that point, setup() is called; then process() is called until it is finished; then destroy() is called. If there are still sources in the pool waiting to be processed, then the UDFilter/UDSource pair will be given a second Source; setup() will be called a second time, then process() until it is finished, then destroy() . This repeats until all sources have been read.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
returnType: type of the return value
Exceptions
UdfException: UDF problem
Member Data Documentation
◆ writer
StreamWriter com.vertica.sdk.UDParser.writer
protected
Writer to write parsed tuples to. Has the same API as PartitionWriter , from the UDT framework.
158 - com.vertica.sdk.UDParser Member List
This is the complete list of members for com.vertica.sdk.UDParser , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface, SizedColumnTypes returnType)
com.vertica.sdk.UDParser
destroy(ServerInterface srvInterface, SizedColumnTypes returnType, SessionParamWriterMap udSessionParams) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getRecordsAcceptedInBatch() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getRejectedRecord()
com.vertica.sdk.UDParser
getSeenEOB() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
getStreamWriter() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
increRecordsAcceptedInBatch() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
isCanceled()
com.vertica.sdk.UDXObject
process(ServerInterface srvInterface, DataBuffer input, InputState input_state)
com.vertica.sdk.UDParser
recordsAcceptedInBatch (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
protected
seen_eob (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
protected
setRecordsAcceptedInBatch(int i) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setSeenEOB(Boolean b) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setStreamWriter(StreamWriter writer) (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
setup(ServerInterface srvInterface, SizedColumnTypes returnType)
com.vertica.sdk.UDParser
UDParser() (defined in com.vertica.sdk.UDParser)
com.vertica.sdk.UDParser
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
writer
com.vertica.sdk.UDParser
protected
159 - com.vertica.sdk.UDSource Class Reference
Inheritance diagram for com.vertica.sdk.UDSource:
Collaboration diagram for com.vertica.sdk.UDSource:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface) throws UdfException
void
destroy (ServerInterface srvInterface, SessionParamWriterMap udSessionParams) throws UdfException
Portion
getPortion ()
Integer
getSize ()
String
getUri ()
boolean
isCanceled ()
abstract StreamState
process (ServerInterface srvInterface, DataBuffer output) throws UdfException
void
setup (ServerInterface srvInterface) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Acquires data from an external source (such as a file or URL) and produces that data in a streaming manner.
The output of a UDSource can be sent through one or more UDFilters followed by one UDParser .
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy()
void com.vertica.sdk.UDSource.destroy(ServerInterface srvInterface) throws UdfException
UDSource::destroy()
Will be invoked during query execution, after the last time that process() is called on this UDSource instance.
May write UD Session Parameters for namespaces public and library
May optionally be overridden to perform tear-down/destruction.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Exceptions
UdfException: UDF problem
◆ getPortion()
Portion com.vertica.sdk.UDSource.getPortion()
UDSource::getPortion()
Returns
Portion information associated with this source, if available
◆ getSize()
Integer com.vertica.sdk.UDSource.getSize()
UDSource::getSize()
Returns the estimated number of bytes that process() will return.
This value is treated as advisory only. It is used to indicate the file size in the LOAD_STREAMS table.
IMPORTANT: getSize() can be called at any time, even before setup() is called! (Though not before or during the constructor.)
In the case of Sources whose factories can potentially produce many UDSource instances, getSize() should avoid acquiring resources that last for the life of the object. Doing otherwise can defeat Vertica's attempts to limit the maximum number of Sources that are consuming system resources at any given time. For example, if it opens a file handle and leaves that file handle open for use by process() , and if a large number of UDSources are loaded in a single statement, the query may exceed the operating system limit on file handles and crash, even though Vertica only operates on a small number of files at once. This doesn't apply to singleton Sources, Sources whose factory will only ever produce one UDSource instance.
Returns
the size
◆ getUri()
String com.vertica.sdk.UnsizedUDSource.getUri()
inherited
UnsizedUDSource::getUri()
This function will be invoked during execution to fill in monitoring information.
Returns
the URI of the current source of data.
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ process()
abstract StreamState com.vertica.sdk.UDSource.process(ServerInterface srvInterface, DataBuffer output) throws UdfException
abstract
UDSource::process()
Will be invoked repeatedly during query execution, until it returns DONE or until the query is canceled by the user.
On each invocation, process() should acquire more data and write that data to the buffer specified by output.
process() must set output.offset to the number of bytes that were written to the output buffer. It is common, though not necessary, for this to be the same as output.size. output.offset is initially uninitialized. If it is set to 0, this indicates that the output buffer is too small for process() to be able to write a unit of input to it.
Note that, unless OUTPUT_NEEDED is returned, output will be UNMODIFIED the next time process() is called. This means that pointers into the buffer will continue to be valid. It also means that output.offset may be set. So, in general, process() code should assume that buffers start at output.buf[output.offset]. Note also that, as a performance optimization, upstream operators may start processing emitted data (data between output.buf[0] and output.buf[output.offset]) before OUTPUT_NEEDED is returned. For this reason, output.offset must be strictly increasing.
process() must not block indefinitely. If it cannot proceed for an extended period of time, it should return KEEP_GOING. It will be called again shortly. Failure to do this will, among other things, prevent the query from being canceled by the user.
Note that it is UNSAFE to maintain pointers or references to any of these arguments (or any other argument passed by reference into any other function in this API) beyond the scope of the function call in question. For example, do not store a reference to the server interface or the input block on an instance variable. Vertica may free and replace these objects.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Returns
OUTPUT_NEEDED if this UDSource has more data to produce; DONE if has no more data to produce.
Exceptions
UdfException: UDF problem
◆ setup()
void com.vertica.sdk.UDSource.setup(ServerInterface srvInterface) throws UdfException
UDSource::setup()
Will be invoked during query execution, prior to the first time that process() is called on this UDSource instance.
May optionally be overridden to perform setup/initialization.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Exceptions
UdfException: UDF problem
160 - com.vertica.sdk.UDSource Member List
This is the complete list of members for com.vertica.sdk.UDSource , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface)
com.vertica.sdk.UDSource
destroy(ServerInterface srvInterface, SessionParamWriterMap udSessionParams) (defined in com.vertica.sdk.UDSource)
com.vertica.sdk.UDSource
getPortion()
com.vertica.sdk.UDSource
getSize()
com.vertica.sdk.UDSource
getUri()
com.vertica.sdk.UnsizedUDSource
isCanceled()
com.vertica.sdk.UDXObject
process(ServerInterface srvInterface, DataBuffer output)
com.vertica.sdk.UDSource
setup(ServerInterface srvInterface)
com.vertica.sdk.UDSource
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
161 - com.vertica.sdk.UDXFactory Class Reference
Inheritance diagram for com.vertica.sdk.UDXFactory:
Collaboration diagram for com.vertica.sdk.UDXFactory:
Public Member Functions
void
getParameterType (ServerInterface srvInterface, SizedColumnTypes parameterTypes)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res)
void
getPerInstanceResources (ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
abstract void
getPrototype (ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstract void
getReturnType (ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
abstract UDXType
getUDXFactoryType ()
Protected Attributes
long
libOid
String
sqlName
Detailed Description
Parent class for UDx factories; not intended for direct use by applications.
Member Function Documentation
◆ getParameterType()
void com.vertica.sdk.UDXFactory.getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
Function to tell Vertica the name and types of parameters that this function uses. Vertica will use this to warn function callers that certain parameters they provide are not affecting anything, or that certain parameters that are not being set are reverting to default values.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
parameterTypes: SizedColumnTypes describing the parameters
◆ getPerInstanceResources() [1/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res)
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
Referenced by com.vertica.sdk.UDXFactory.getPerInstanceResources() .
◆ getPerInstanceResources() [2/2]
void com.vertica.sdk.UDXFactory.getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
Set the resource required for each instance of the UDX Object subclass
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
res: a VResources object used to tell Vertica what resources are needed by the UDX
argTypes: Provides the data types of arguments that this UDx was called with. This may be used to calculate the resources required by the UDx.
◆ getPrototype()
abstract void com.vertica.sdk.UDXFactory.getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
abstract
Provides the argument and return types of the UDX
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments
returnType: the type(s) of the return
Referenced by com.vertica.sdk.ScalarFunctionFactory.getReturnType() .
◆ getReturnType()
abstract void com.vertica.sdk.UDXFactory.getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType) throws UdfException
abstract
Function to tell Vertica what the return types (and length/precision if necessary) of this UDX are.
For CHAR/VARCHAR types, specify the max length,
For NUMERIC types, specify the precision and scale.
For Time types (with or without time zone), specify the precision, -1 means unspecified/don't care
For IntervalYM/IntervalDS types, specify the precision and range
For all other types, no length/precision specification needed
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: Provides the data types of arguments that this UDT was called with. This may be used to modify the return types accordingly.
returnType: User code must fill in the names and data types returned by the UDT.
◆ getUDXFactoryType()
abstract UDXType com.vertica.sdk.UDXFactory.getUDXFactoryType()
abstract
User subclasses should use the appropriate subclass of UDXFactory and not override this method on their own.
Returns
the type of UDX Object instance this factory returns.
162 - com.vertica.sdk.UDXFactory Member List
This is the complete list of members for com.vertica.sdk.UDXFactory , including all inherited members.
getParameterType(ServerInterface srvInterface, SizedColumnTypes parameterTypes)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res)
com.vertica.sdk.UDXFactory
getPerInstanceResources(ServerInterface srvInterface, VResources res, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFactory
getPrototype(ServerInterface srvInterface, ColumnTypes argTypes, ColumnTypes returnType)
com.vertica.sdk.UDXFactory
getReturnType(ServerInterface srvInterface, SizedColumnTypes argTypes, SizedColumnTypes returnType)
com.vertica.sdk.UDXFactory
getUDXFactoryType()
com.vertica.sdk.UDXFactory
libOid (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
sqlName (defined in com.vertica.sdk.UDXFactory)
com.vertica.sdk.UDXFactory
protected
163 - com.vertica.sdk.UDXFactory.UDXType Enum Reference
Collaboration diagram for com.vertica.sdk.UDXFactory.UDXType:
Public Member Functions
int
getCode ()
Public Attributes
AGGREGATE =(5)
ANALYTIC =(3)
LOAD_FILTER =(7)
LOAD_PARSER =(8)
LOAD_SOURCE =(6)
MULTI_TRANSFORM =(4)
SCALAR =(1)
TRANSFORM =(2)
Detailed Description
The type of UDX instance this factory produces
164 - com.vertica.sdk.UDXFactory.UDXType Member List
This is the complete list of members for com.vertica.sdk.UDXFactory.UDXType , including all inherited members.
AGGREGATE (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
ANALYTIC (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
getCode() (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
LOAD_FILTER (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
LOAD_PARSER (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
LOAD_SOURCE (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
MULTI_TRANSFORM (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
SCALAR (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
TRANSFORM (defined in com.vertica.sdk.UDXFactory.UDXType)
com.vertica.sdk.UDXFactory.UDXType
165 - com.vertica.sdk.UDXFunction Class Reference
Inheritance diagram for com.vertica.sdk.UDXFunction:
Collaboration diagram for com.vertica.sdk.UDXFunction:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes)
void
destroy (ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
boolean
isCanceled ()
void
setup (ServerInterface srvInterface, SizedColumnTypes argTypes)
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ destroy() [1/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
Perform per instance destruction. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
Referenced by com.vertica.sdk.UDXFunction.destroy() .
◆ destroy() [2/2]
void com.vertica.sdk.UDXFunction.destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
Perform per instance destruction and write session parameters to be used by UDxs that are invoked after this one returns. This function may throw errors
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
udSessionParams: a SessionParamWriterMap
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ setup()
void com.vertica.sdk.UDXFunction.setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
Perform per instance initialization. This function may throw errors.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
argTypes: the types of the arguments (as SizedColumnTypes)
166 - com.vertica.sdk.UDXFunction Member List
This is the complete list of members for com.vertica.sdk.UDXFunction , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
destroy(ServerInterface srvInterface, SizedColumnTypes argTypes, SessionParamWriterMap udSessionParams)
com.vertica.sdk.UDXFunction
isCanceled()
com.vertica.sdk.UDXObject
setup(ServerInterface srvInterface, SizedColumnTypes argTypes)
com.vertica.sdk.UDXFunction
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
167 - com.vertica.sdk.UDXLibrary Class Reference
Collaboration diagram for com.vertica.sdk.UDXLibrary:
Public Member Functions
String
getAuthor ()
String
getDescription ()
String
getLibraryBuildTag ()
String
getLibrarySDKVersion ()
String
getLibraryVersion ()
String
getLicensesRequired ()
String
getSignature ()
String
getSourceUrl ()
Detailed Description
MetaData interface for Vertica User Defined extension libraries
168 - com.vertica.sdk.UDXLibrary Member List
This is the complete list of members for com.vertica.sdk.UDXLibrary , including all inherited members.
getAuthor() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getDescription() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getLibraryBuildTag() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getLibrarySDKVersion() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getLibraryVersion() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getLicensesRequired() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getSignature() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
getSourceUrl() (defined in com.vertica.sdk.UDXLibrary)
com.vertica.sdk.UDXLibrary
169 - com.vertica.sdk.UDXObject Class Reference
Inheritance diagram for com.vertica.sdk.UDXObject:
Collaboration diagram for com.vertica.sdk.UDXObject:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
boolean
isCanceled ()
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
Base class for Vertica User-Defined extensions (the function classes themselves). Not intended for direct use by applications.
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
170 - com.vertica.sdk.UDXObject Member List
This is the complete list of members for com.vertica.sdk.UDXObject , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
isCanceled()
com.vertica.sdk.UDXObject
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
171 - com.vertica.sdk.UnsizedUDSource Class Reference
Inheritance diagram for com.vertica.sdk.UnsizedUDSource:
Collaboration diagram for com.vertica.sdk.UnsizedUDSource:
Public Member Functions
final void
cancelUDX (ServerInterface srvInterface)
void
destroy (ServerInterface srvInterface) throws UdfException
void
destroy (ServerInterface srvInterface, SessionParamWriterMap udSessionParams) throws UdfException
String
getUri ()
boolean
isCanceled ()
abstract StreamState
process (ServerInterface srvInterface, DataBuffer output) throws UdfException
void
setup (ServerInterface srvInterface) throws UdfException
Protected Member Functions
void
cancel (ServerInterface srvInterface)
Detailed Description
UnsizedUDSource
Base class for UDSource . Used with IterativeSourceFactory if computing the size of a source up front would be prohibitively expensive, or if the number of distinct sources would be prohibitively large to use the standard API.
Not intended or optimized for typical applications.
Member Function Documentation
◆ cancel()
void com.vertica.sdk.UDXObject.cancel(ServerInterface srvInterface)
protected inherited
Cancel callback to be overridden by the UDX implementation. Called when the query running the UDX has been canceled.
This method will be invoked at most once per UDX object. Once a UDX object has been canceled, it will never be un-canceled.
This method may be called from a separate thread, concurrently with other methods of this UDX object (but never the constructor). Implementations must be thread-safe with all methods of this UDX.
This method will be invoked for either an explicit user cancel, or in the event of an error during query execution.
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
◆ cancelUDX()
final void com.vertica.sdk.UDXObject.cancelUDX(ServerInterface srvInterface)
inherited
Cancel callback invoked when the query running the UDX has been canceled.
See cancel() .
Parameters
srvInterface: a ServerInterface object used to communicate with Vertica
◆ getUri()
String com.vertica.sdk.UnsizedUDSource.getUri()
UnsizedUDSource::getUri()
This function will be invoked during execution to fill in monitoring information.
Returns
the URI of the current source of data.
◆ isCanceled()
boolean com.vertica.sdk.UDXObject.isCanceled()
inherited
Returns
true if execution was canceled.
Referenced by com.vertica.sdk.UDXObject.cancelUDX() .
172 - com.vertica.sdk.UnsizedUDSource Member List
This is the complete list of members for com.vertica.sdk.UnsizedUDSource , including all inherited members.
cancel(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
protected
cancelUDX(ServerInterface srvInterface)
com.vertica.sdk.UDXObject
destroy(ServerInterface srvInterface) (defined in com.vertica.sdk.UnsizedUDSource)
com.vertica.sdk.UnsizedUDSource
destroy(ServerInterface srvInterface, SessionParamWriterMap udSessionParams) (defined in com.vertica.sdk.UnsizedUDSource)
com.vertica.sdk.UnsizedUDSource
getUri()
com.vertica.sdk.UnsizedUDSource
isCanceled()
com.vertica.sdk.UDXObject
process(ServerInterface srvInterface, DataBuffer output) (defined in com.vertica.sdk.UnsizedUDSource)
com.vertica.sdk.UnsizedUDSource
setup(ServerInterface srvInterface) (defined in com.vertica.sdk.UnsizedUDSource)
com.vertica.sdk.UnsizedUDSource
UDXObject() (defined in com.vertica.sdk.UDXObject)
com.vertica.sdk.UDXObject
173 - com.vertica.sdk.VerticaBlock Class Reference
Inheritance diagram for com.vertica.sdk.VerticaBlock:
Collaboration diagram for com.vertica.sdk.VerticaBlock:
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
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)
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)
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)
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)
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)
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
◆ 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
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()
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.
SizedColumnTypes com.vertica.sdk.VerticaBlock.getTypeMetaData()
Returns
information about the types and numbers of arguments
Referenced by
174 - com.vertica.sdk.VerticaBlock Member List
This is the complete list of members for com.vertica.sdk.VerticaBlock , including all inherited members.
addCol(ByteBuffer arg, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt)
com.vertica.sdk.VerticaBlock
addCol(ByteBuffer arg, ByteBuffer da, int colstride, VerticaType dt, String colName)
com.vertica.sdk.VerticaBlock
checkStringUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
checkTimeUserBlockInfo(int idx) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
clear() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
coldataareas (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
cols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
colstrides (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
count (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
currentPos (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
protected
getColDataAreaRef(int idx)
com.vertica.sdk.VerticaBlock
getColRef(int idx)
com.vertica.sdk.VerticaBlock
getInlineColBuffer(int idx)
com.vertica.sdk.VerticaBlock
protected
getNumCols()
com.vertica.sdk.VerticaBlock
getNumRows()
com.vertica.sdk.VerticaBlock
getProcessBlockUserInfoVectorAt(int i) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
getTypeMetaData()
com.vertica.sdk.VerticaBlock
index (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
ncols (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
nrows (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
resetBuffers() (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
typeMetaData (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
VerticaBlock(int _ncols, int _rowcount) (defined in com.vertica.sdk.VerticaBlock)
com.vertica.sdk.VerticaBlock
175 - com.vertica.sdk.VerticaType Class Reference
Collaboration diagram for com.vertica.sdk.VerticaType:
Public Member Functions
int
getIntervalPrecision ()
For INTERVAL data types, returns the precision.
int
getIntervalRange ()
For INTERVAL data types, returns the range.
int
getMaxSize ()
int
getNumericFractional ()
int
getNumericIntegral ()
int
getNumericLength ()
For NUMERIC data types, returns the number of bytes required to store an element. Calling this with a non-numeric data type can cause a crash.
int
getNumericPrecision ()
int
getNumericScale ()
int
getNumericWordCount ()
String
getPrettyPrintStr ()
int
getStringLength ()
For VARCHAR/CHAR/VARBINARY/BINARY data types, returns the length of the string.
int
getTimestampPrecision ()
For TIMESTAMP data types, returns the precision.
boolean
isBinary ()
boolean
isBool ()
boolean
isChar ()
boolean
isDate ()
boolean
isFloat ()
boolean
isInt ()
boolean
isLongVarbinary ()
boolean
isLongVarchar ()
boolean
isNumeric ()
boolean
isStringType ()
Return true for VARCHAR/CHAR/VARBINARY/BINARY data types.
boolean
isTimestamp ()
boolean
isVarbinary ()
boolean
isVarchar ()
void
setIntervalPrecision (int precision)
For INTERVAL data types, sets the precision.
void
setIntervalRange (int range)
For INTERVAL data types, sets the range.
void
setNumericPrecision (int precision)
For NUMERIC data types, sets the precision.
void
setNumericScale (int scale)
For NUMERIC data types, sets the scale.
void
setTimestampPrecision (int precision)
For TIMESTAMP data types, sets the precision.
String
toString ()
Detailed Description
Represents types of data that are passed into and returned back from user's code
Member Function Documentation
◆ getMaxSize()
int com.vertica.sdk.VerticaType.getMaxSize()
Returns
The maximum size, in bytes, of a data element of this type.
Referenced by com.vertica.sdk.PartitionWriter.copyFromInput() .
◆ isBinary()
boolean com.vertica.sdk.VerticaType.isBinary()
Returns
true if this type is BINARY, false otherwise.
Referenced by com.vertica.sdk.NoopTypeCoercion.asBinaryBytes() .
◆ isBool()
boolean com.vertica.sdk.VerticaType.isBool()
Returns
true if this type is BOOLEAN, false otherwise.
◆ isChar()
boolean com.vertica.sdk.VerticaType.isChar()
Returns
true if this type is CHAR, false otherwise.
Referenced by
◆ isDate()
boolean com.vertica.sdk.VerticaType.isDate()
Returns
true if this type is DATE, false otherwise.
◆ isFloat()
boolean com.vertica.sdk.VerticaType.isFloat()
Returns
true if this type is FLOAT, false otherwise.
◆ isInt()
boolean com.vertica.sdk.VerticaType.isInt()
Returns
true if this type is INTEGER, false otherwise.
◆ isLongVarbinary()
boolean com.vertica.sdk.VerticaType.isLongVarbinary()
Returns
true if this type is LONGVARBINARY, false otherwise.
◆ isLongVarchar()
boolean com.vertica.sdk.VerticaType.isLongVarchar()
Returns
true if this type is LONGVARCHAR, false otherwise.
◆ isNumeric()
boolean com.vertica.sdk.VerticaType.isNumeric()
Returns
true if this type is NUMERIC, false otherwise.
◆ isTimestamp()
boolean com.vertica.sdk.VerticaType.isTimestamp()
Returns
true if this type is TIMESTAMP, false otherwise.
◆ isVarbinary()
boolean com.vertica.sdk.VerticaType.isVarbinary()
Returns
true if this type is VARBINARY, false otherwise.
◆ isVarchar()
boolean com.vertica.sdk.VerticaType.isVarchar()
Returns
true if this type is VARCHAR, false otherwise.
176 - com.vertica.sdk.VerticaType Member List
This is the complete list of members for com.vertica.sdk.VerticaType , including all inherited members.
getIntervalPrecision()
com.vertica.sdk.VerticaType
getIntervalRange()
com.vertica.sdk.VerticaType
getMaxSize()
com.vertica.sdk.VerticaType
getNumericFractional() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getNumericIntegral() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getNumericLength()
com.vertica.sdk.VerticaType
getNumericPrecision() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getNumericScale() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getNumericWordCount() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getPrettyPrintStr() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
getStringLength()
com.vertica.sdk.VerticaType
getTimestampPrecision()
com.vertica.sdk.VerticaType
isBinary()
com.vertica.sdk.VerticaType
isBool()
com.vertica.sdk.VerticaType
isChar()
com.vertica.sdk.VerticaType
isDate()
com.vertica.sdk.VerticaType
isFloat()
com.vertica.sdk.VerticaType
isInt()
com.vertica.sdk.VerticaType
isLongVarbinary()
com.vertica.sdk.VerticaType
isLongVarchar()
com.vertica.sdk.VerticaType
isNumeric()
com.vertica.sdk.VerticaType
isStringType()
com.vertica.sdk.VerticaType
isTimestamp()
com.vertica.sdk.VerticaType
isVarbinary()
com.vertica.sdk.VerticaType
isVarchar()
com.vertica.sdk.VerticaType
setIntervalPrecision(int precision)
com.vertica.sdk.VerticaType
setIntervalRange(int range)
com.vertica.sdk.VerticaType
setNumericPrecision(int precision)
com.vertica.sdk.VerticaType
setNumericScale(int scale)
com.vertica.sdk.VerticaType
setTimestampPrecision(int precision)
com.vertica.sdk.VerticaType
toString() (defined in com.vertica.sdk.VerticaType)
com.vertica.sdk.VerticaType
177 - com.vertica.sdk.vmap.InvalidMapKeyException Class Reference
Inheritance diagram for com.vertica.sdk.vmap.InvalidMapKeyException:
Collaboration diagram for com.vertica.sdk.vmap.InvalidMapKeyException:
Public Member Functions
InvalidMapKeyException (String msg, String key)
String
getKey ()
Detailed Description
An Exception that is thrown when an invalid key is found when attempting to encode a vmap, Vertica's aggregate type that powers Flex tables.
Constructor & Destructor Documentation
◆ InvalidMapKeyException()
com.vertica.sdk.vmap.InvalidMapKeyException.InvalidMapKeyException(String msg, String key)
Create an exception caused by an invalid key, with associated message (reason).
Parameters
msg: The reason for the exception, or more details on its cause.
key: The key that is invalid.
Member Function Documentation
◆ getKey()
String com.vertica.sdk.vmap.InvalidMapKeyException.getKey()
Get the key value that caused the exception (i.e. is invalid).
Returns
The invalid key
178 - com.vertica.sdk.vmap.InvalidMapKeyException Member List
This is the complete list of members for com.vertica.sdk.vmap.InvalidMapKeyException , including all inherited members.
getKey()
com.vertica.sdk.vmap.InvalidMapKeyException
InvalidMapKeyException(String msg, String key)
com.vertica.sdk.vmap.InvalidMapKeyException
VMapEncodingException(String why) (defined in com.vertica.sdk.vmap.VMapEncodingException)
com.vertica.sdk.vmap.VMapEncodingException
VMapEncodingException(String why, Throwable causedBy) (defined in com.vertica.sdk.vmap.VMapEncodingException)
com.vertica.sdk.vmap.VMapEncodingException
179 - com.vertica.sdk.vmap.v1.Encoder Class Reference
Inheritance diagram for com.vertica.sdk.vmap.v1.Encoder:
Collaboration diagram for com.vertica.sdk.vmap.v1.Encoder:
Classes
class
MatchingKeySelector
Public Member Functions
Encoder (TypeCoercion coercion)
int
byteSize ()
void
consume (Map< String, ?> data)
void
consume (Iterator< Map.Entry< String, Object >> data)
void
consume (Iterator< Map.Entry< String, Object >> data, int sizeEstimate)
ByteBuffer
encode ()
void
encode (ByteBuffer buffer)
String
keyForIdent (String ident)
Detailed Description
An encoder able to generate a VMap, Vertica's aggregate data type.
To use, call consume followed by encode() .
Constructor & Destructor Documentation
◆ Encoder()
com.vertica.sdk.vmap.v1.Encoder.Encoder(TypeCoercion coercion)
Create an Encoder instance.
Parameters
coercion: A TypeCoercion instance used to provide guidance on serializing input data before encoding it into a VMap.
Member Function Documentation
◆ byteSize()
int com.vertica.sdk.vmap.v1.Encoder.byteSize()
Returns the output length of the encoded VMap. Available only after consume.
Returns
The byte size of the output vmap.
Referenced by com.vertica.sdk.vmap.v1.Encoder.encode() .
◆ consume() [1/3]
void com.vertica.sdk.vmap.v1.Encoder.consume(Map< String, ?> data)
Execute the consume phase of encoding.
Parameters
data: A map of data specified with String keys.
Referenced by
◆ consume() [2/3]
void com.vertica.sdk.vmap.v1.Encoder.consume(Iterator< Map.Entry< String, Object >> data)
Execute the consume phase of encoding with a default guess at the number of data elements.
Parameters
data: An iterator over a map-like object which has all String keys.
◆ consume() [3/3]
void com.vertica.sdk.vmap.v1.Encoder.consume(Iterator< Map.Entry< String, Object >> data, int sizeEstimate)
Execute the consume phase of encoding.
Parameters
data: An iterator over a map-like object which has all String keys.
sizeEstimate: A guess at the number of elements found in data. Iterators do not provide a means of querying size.
◆ encode() [1/2]
ByteBuffer com.vertica.sdk.vmap.v1.Encoder.encode()
Get the encoded VMap as a new ByteBuffer.
Returns
A ByteBuffer with the VMap representation from 0 to limit.
◆ encode() [2/2]
void com.vertica.sdk.vmap.v1.Encoder.encode(ByteBuffer buffer)
Write the VMap into a ByteBuffer and return the number of bytes written. The buffer's position will be advanced to the end of the VMap.
Parameters
buffer: The target buffer, which must have at least byteSize() remaining, or a BufferOverflowException will result.
◆ keyForIdent()
String com.vertica.sdk.vmap.v1.Encoder.keyForIdent(String ident)
Returns the key name of the first key that matches ident according to identifier comparison. Requires that data already be consumed.
See also
#consume(Map)
Implements com.vertica.sdk.vmap.v1.KeySelector .
180 - com.vertica.sdk.vmap.v1.Encoder Member List
This is the complete list of members for com.vertica.sdk.vmap.v1.Encoder , including all inherited members.
byteSize()
com.vertica.sdk.vmap.v1.Encoder
consume(Map< String, ?> data)
com.vertica.sdk.vmap.v1.Encoder
consume(Iterator< Map.Entry< String, Object >> data)
com.vertica.sdk.vmap.v1.Encoder
consume(Iterator< Map.Entry< String, Object >> data, int sizeEstimate)
com.vertica.sdk.vmap.v1.Encoder
encode()
com.vertica.sdk.vmap.v1.Encoder
encode(ByteBuffer buffer)
com.vertica.sdk.vmap.v1.Encoder
Encoder(TypeCoercion coercion)
com.vertica.sdk.vmap.v1.Encoder
keyForIdent(String ident)
com.vertica.sdk.vmap.v1.Encoder
181 - com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector Class Reference
Inheritance diagram for com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector:
Collaboration diagram for com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector:
Public Member Functions
MatchingKeySelector ()
void
consume (Map< String, ?> data)
String
keyForIdent (String ident)
Detailed Description
A class that mimics the exact behavior of Encoder#keyForIdent(String) without having to pay the full performance cost of Encoder#consume(Map).
Constructor & Destructor Documentation
◆ MatchingKeySelector()
com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector.MatchingKeySelector()
Create a MatchingKeySelector instance.
Member Function Documentation
◆ consume()
void com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector.consume(Map< String, ?> data)
Consumes a map of data, looking only at the keys. This is necessary before calling keyForIdent(String) .
Parameters
data: A map of data specified with String keys.
Referenced by com.vertica.sdk.PartitionWriter.setRowFromMap() .
◆ keyForIdent()
String com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector.keyForIdent(String ident)
Returns the key name of the first key that matches ident according to identifier comparison. Requires that data already be consumed.
See also
#consume(Map)
Implements com.vertica.sdk.vmap.v1.KeySelector .
182 - com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector Member List
This is the complete list of members for com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector , including all inherited members.
consume(Map< String, ?> data)
com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector
keyForIdent(String ident)
com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector
MatchingKeySelector()
com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector
183 - com.vertica.sdk.vmap.v1.KeySelector Interface Reference
Inheritance diagram for com.vertica.sdk.vmap.v1.KeySelector:
Collaboration diagram for com.vertica.sdk.vmap.v1.KeySelector:
Public Member Functions
String
keyForIdent (String ident)
Detailed Description
An interface that provides deterministic resolution of identifiers to source data keys. See PartitionWriter#setRowFromMap(Map, com.vertica.sdk.TypeCoercion).
Member Function Documentation
◆ keyForIdent()
String com.vertica.sdk.vmap.v1.KeySelector.keyForIdent(String ident)
Returns the key name of the first key that matches ident according to identifier comparison.
Parameters
ident: A SQL identifier or "key", similar to a column name.
Returns
A key from within the data that matches the ident, or null if not found.
Implemented in com.vertica.sdk.vmap.v1.Encoder.MatchingKeySelector , and com.vertica.sdk.vmap.v1.Encoder .
184 - com.vertica.sdk.vmap.v1.KeySelector Member List
This is the complete list of members for com.vertica.sdk.vmap.v1.KeySelector , including all inherited members.
keyForIdent(String ident)
com.vertica.sdk.vmap.v1.KeySelector
185 - com.vertica.sdk.vmap.VMapEncodingException Class Reference
Inheritance diagram for com.vertica.sdk.vmap.VMapEncodingException:
Collaboration diagram for com.vertica.sdk.vmap.VMapEncodingException:
Public Member Functions
VMapEncodingException (String why)
VMapEncodingException (String why, Throwable causedBy)
Detailed Description
A catch-all exception that is thrown whenever there is a problem encoding a vmap, Vertica's aggregate type that powers Flex tables.
An Exception that is thrown when an invalid key is found when attempting to encode or decode a vmap, Vertica's aggregate type that powers Flex tables.
186 - com.vertica.sdk.vmap.VMapEncodingException Member List
This is the complete list of members for com.vertica.sdk.vmap.VMapEncodingException , including all inherited members.
VMapEncodingException(String why) (defined in com.vertica.sdk.vmap.VMapEncodingException)
com.vertica.sdk.vmap.VMapEncodingException
VMapEncodingException(String why, Throwable causedBy) (defined in com.vertica.sdk.vmap.VMapEncodingException)
com.vertica.sdk.vmap.VMapEncodingException
187 - com.vertica.sdk.VNumeric Class Reference
Collaboration diagram for com.vertica.sdk.VNumeric:
Public Member Functions
VNumeric (ByteBuffer buff, int data_offset, int max_data_len, int typmod)
VNumeric (BigDecimal words, int precision, int scale)
VNumeric (BigDecimal words, int t)
void
accumulate (VNumeric from)
void
add (VNumeric a, VNumeric b)
int
compare (VNumeric from)
int
compareUnsigned (VNumeric from)
void
copy (VNumeric from)
void
div (VNumeric a, VNumeric b)
boolean
equal (VNumeric from)
int
getScale ()
void
incr ()
void
invertSign ()
boolean
isNeg ()
boolean
isNull ()
boolean
isZero ()
void
mul (VNumeric a, VNumeric b)
void
setNull ()
void
setZero ()
void
shiftLeft (int bitsToShift)
void
shiftRight (int bitsToShift)
void
sub (VNumeric a, VNumeric b)
void
toString (ByteBuffer outBuf, int olen)
String
toString ()
Detailed Description
Representation of NUMERIC, fixed point data types in Vertica.
188 - com.vertica.sdk.VNumeric Member List
This is the complete list of members for com.vertica.sdk.VNumeric , including all inherited members.
accumulate(VNumeric from) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
add(VNumeric a, VNumeric b) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
compare(VNumeric from) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
compareUnsigned(VNumeric from) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
copy(VNumeric from) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
div(VNumeric a, VNumeric b) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
equal(VNumeric from) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
getScale() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
incr() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
invertSign() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
isNeg() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
isNull() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
isZero() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
mul(VNumeric a, VNumeric b) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
setNull() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
setZero() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
shiftLeft(int bitsToShift) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
shiftRight(int bitsToShift) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
sub(VNumeric a, VNumeric b) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
toString(ByteBuffer outBuf, int olen) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
toString() (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
VNumeric(ByteBuffer buff, int data_offset, int max_data_len, int typmod) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
VNumeric(BigDecimal words, int precision, int scale) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
VNumeric(BigDecimal words, int t) (defined in com.vertica.sdk.VNumeric)
com.vertica.sdk.VNumeric
189 - com.vertica.sdk.VResources Class Reference
Collaboration diagram for com.vertica.sdk.VResources:
Public Attributes
int
nFileHandles
long
scratchMemory
Detailed Description
Representation of the resources user code can ask Vertica for
Member Data Documentation
◆ nFileHandles
int com.vertica.sdk.VResources.nFileHandles
Number of file handles / sockets required
◆ scratchMemory
long com.vertica.sdk.VResources.scratchMemory
Amount of RAM in bytes used by User defined function
190 - com.vertica.sdk.VResources Member List
This is the complete list of members for com.vertica.sdk.VResources , including all inherited members.
nFileHandles
com.vertica.sdk.VResources
scratchMemory
com.vertica.sdk.VResources
VResources() (defined in com.vertica.sdk.VResources)
com.vertica.sdk.VResources
191 - com.vertica.sdk.VString Class Reference
Collaboration diagram for com.vertica.sdk.VString:
Public Member Functions
VString (ByteBuffer buf, int offset, int totalMaxLen)
VString (ByteBuffer hbuf, ByteBuffer dbuf, int hoffset, int doffset, int maxDataLen)
void
copy (byte[] from)
void
copy (String from)
void
copy (VString from)
ByteBuffer
data ()
boolean
isNull ()
int
length ()
void
setNull ()
String
str ()
String
toString ()
Detailed Description
Representation of a String in Vertica. All character data is internally encoded as UTF-8 characters and is not NULL terminated.
Constructor & Destructor Documentation
◆ VString() [1/2]
com.vertica.sdk.VString.VString(ByteBuffer buf, int offset, int totalMaxLen)
Contruct a VString object
Parameters
buf: the ByteBuffer providing the space to back the VString
offset: offset of the beginning of VString into the ByteBuffer
totalMaxLen: the maximum length of the string structure including the header
◆ VString() [2/2]
com.vertica.sdk.VString.VString(ByteBuffer hbuf, ByteBuffer dbuf, int hoffset, int doffset, int maxDataLen)
Construct an out of line VString object
Parameters
hbuf: the ByteBuffer with the VString header
dbuf: the ByteBuffer with the actual data
hoffset: of the beginning of VString header in hbuf
doffset: offset of the actual string data
maxDataLen: maximum length of the string structure not including the header
Member Function Documentation
◆ copy() [1/3]
void com.vertica.sdk.VString.copy(byte \[\] from)
Copy character data from byte array to the VString 's internal buffer.
Parameters
from: array of bytes input data
◆ copy() [2/3]
void com.vertica.sdk.VString.copy(String from)
Copy character data from String
Parameters
from: Java String object as character input data
◆ copy() [3/3]
void com.vertica.sdk.VString.copy(VString from)
Copy data from another VString .
Parameters
◆ data()
ByteBuffer com.vertica.sdk.VString.data()
Provides a read-only ByteBuffer to this VString 's internal character data.
Note
The returned string is not null terminated
Returns
the read only character data for this string in a ByteBuffer
◆ isNull()
boolean com.vertica.sdk.VString.isNull()
Indicates if this VString contains the SQL NULL value
Returns
true if this string contains the SQL NULL value, false otherwise
Referenced by com.vertica.sdk.VString.str() .
◆ length()
int com.vertica.sdk.VString.length()
Returns the length of this VString
Returns
the length of the string, in bytes. Does not include any extra space for null characters.
Referenced by
◆ setNull()
void com.vertica.sdk.VString.setNull()
Sets this VString to the SQL NULL value.
◆ str()
String com.vertica.sdk.VString.str()
Provides a copy of this VString 's data as a Java String
Returns
a Java String copy of the data in this VString
Referenced by com.vertica.sdk.BlockReader.getString() .
192 - com.vertica.sdk.VString Member List
This is the complete list of members for com.vertica.sdk.VString , including all inherited members.
copy(byte[] from)
com.vertica.sdk.VString
copy(String from)
com.vertica.sdk.VString
copy(VString from)
com.vertica.sdk.VString
data()
com.vertica.sdk.VString
isNull()
com.vertica.sdk.VString
length()
com.vertica.sdk.VString
setNull()
com.vertica.sdk.VString
str()
com.vertica.sdk.VString
toString() (defined in com.vertica.sdk.VString)
com.vertica.sdk.VString
VString(ByteBuffer buf, int offset, int totalMaxLen)
com.vertica.sdk.VString
VString(ByteBuffer hbuf, ByteBuffer dbuf, int hoffset, int doffset, int maxDataLen)
com.vertica.sdk.VString
193 - functions b
Here is a list of all documented class members with links to the class documentation for each member:
- b -
194 - functions c
Here is a list of all documented class members with links to the class documentation for each member:
- c -
195 - functions d
Here is a list of all documented class members with links to the class documentation for each member:
- d -
196 - functions e
Here is a list of all documented class members with links to the class documentation for each member:
- e -
197 - functions f
Here is a list of all documented class members with links to the class documentation for each member:
- f -
198 - functions func b
- b -
199 - functions func c
- c -
200 - functions func d
- d -
201 - functions func e
- e -
202 - functions func f
- f -
203 - functions func g
- g -
getArgumentColumns()
: com.vertica.sdk.SizedColumnTypes
getBoolean()
: com.vertica.sdk.BlockReader
getBooleanEvaluation()
: com.vertica.sdk.StandardTypeCoercion
getCharset()
: com.vertica.sdk.StringUtils
getClusterNodes()
: com.vertica.sdk.PlanContext
getCode()
: com.vertica.sdk.State.InputState
getColDataAreaRef()
: com.vertica.sdk.VerticaBlock
getColRef()
: com.vertica.sdk.VerticaBlock
getColumnCount()
: com.vertica.sdk.SizedColumnTypes
getColumnName()
: com.vertica.sdk.SizedColumnTypes
getColumnNames()
: com.vertica.sdk.PerColumnParamReader
getColumnParamReader()
: com.vertica.sdk.PerColumnParamReader
getColumnType()
: com.vertica.sdk.SizedColumnTypes
getContinuousReader()
: com.vertica.sdk.ContinuousUDParser
getContinuousRejector()
: com.vertica.sdk.ContinuousUDParser
getDatabaseName()
: com.vertica.sdk.ServerInterface
getDate()
: com.vertica.sdk.BlockReader
getDateFormat()
: com.vertica.sdk.StandardTypeCoercion
getDateParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultDateFormat()
: com.vertica.sdk.StandardTypeCoercion
getDefaultDateParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultPolicy()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
getDefaultTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
getDefaultTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultTypeCoercion()
: com.vertica.sdk.PartitionWriter
getDesiredThreads()
: com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.SourceFactory
getDouble()
: com.vertica.sdk.BlockReader
getFunctionOid()
: com.vertica.sdk.ServerInterface
getInlineColBuffer()
: com.vertica.sdk.VerticaBlock
getInstance()
: com.vertica.sdk.IdentComparator
getIntervalPrecision()
: com.vertica.sdk.VerticaType
getIntervalRange()
: com.vertica.sdk.VerticaType
getKey()
: com.vertica.sdk.vmap.InvalidMapKeyException
getLastOrderColumnIdx()
: com.vertica.sdk.SizedColumnTypes
getLastPartitionColumnIdx()
: com.vertica.sdk.SizedColumnTypes
getListIterator()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getLocale()
: com.vertica.sdk.ServerInterface
getLong()
: com.vertica.sdk.BlockReader
getMapIterator()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getMaxSize()
: com.vertica.sdk.VerticaType
getMetaType()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getNamespaces()
: com.vertica.sdk.SessionParamReaderMap
, com.vertica.sdk.SessionParamWriterMap
getNodeName()
: com.vertica.sdk.ServerInterface
getNumberOfSources()
: com.vertica.sdk.SourceIterator
getNumCols()
: com.vertica.sdk.VerticaBlock
getNumericLength()
: com.vertica.sdk.VerticaType
getNumericPrecision()
: com.vertica.sdk.Basics
getNumericScale()
: com.vertica.sdk.Basics
getNumericWordCount()
: com.vertica.sdk.Basics
getNumRows()
: com.vertica.sdk.VerticaBlock
getOrderByColumns()
: com.vertica.sdk.SizedColumnTypes
getParameterType()
: com.vertica.sdk.ParserFactory
, com.vertica.sdk.UDXFactory
getParamNames()
: com.vertica.sdk.ParamReader
getParamReader()
: com.vertica.sdk.ServerInterface
getParserReturnType()
: com.vertica.sdk.ParserFactory
getPartitionByColumns()
: com.vertica.sdk.SizedColumnTypes
getPerInstanceResources()
: com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getPhases()
: com.vertica.sdk.MultiPhaseTransformFunctionFactory
getPolicy()
: com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
, com.vertica.sdk.TypeCoercionException
getPortion()
: com.vertica.sdk.UDSource
getPrototype()
: com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getReader()
: com.vertica.sdk.PlanContext
getRejectedRecord()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.UDParser
getReturnType()
: com.vertica.sdk.ScalarFunctionFactory
, com.vertica.sdk.TransformFunctionPhase
, com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getServerInterface()
: com.vertica.sdk.ContinuousUDParser
getSessionParamReader()
: com.vertica.sdk.ServerInterface
getSize()
: com.vertica.sdk.UDSource
getSizeOfSource()
: com.vertica.sdk.SourceIterator
getString()
: com.vertica.sdk.BlockReader
getStringBytes()
: com.vertica.sdk.StringUtils
getStringLength()
: com.vertica.sdk.BlockReader
, com.vertica.sdk.VerticaType
getStringLoc()
: com.vertica.sdk.BlockReader
getTargetNodes()
: com.vertica.sdk.NodeSpecifyingPlanContext
getTimestamp()
: com.vertica.sdk.BlockReader
getTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
getTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
getTimestampPrecision()
: com.vertica.sdk.VerticaType
getType()
: com.vertica.sdk.ParamReader
, com.vertica.sdk.TypeCoercionException
getTypeMetaData()
: com.vertica.sdk.VerticaBlock
getUDSessionParamReader()
: com.vertica.sdk.ServerInterface
, com.vertica.sdk.SessionParamReaderMap
getUDSessionParamReaderMap()
: com.vertica.sdk.ServerInterface
getUDSessionParamWriter()
: com.vertica.sdk.SessionParamWriterMap
getUDXFactoryType()
: com.vertica.sdk.AnalyticFunctionFactory
, com.vertica.sdk.MultiPhaseTransformFunctionFactory
, com.vertica.sdk.ScalarFunctionFactory
, com.vertica.sdk.TransformFunctionFactory
, com.vertica.sdk.UDXFactory
getUri()
: com.vertica.sdk.UnsizedUDSource
getUserName()
: com.vertica.sdk.ServerInterface
getValue()
: com.vertica.sdk.TypeCoercionException
getVNumeric()
: com.vertica.sdk.BlockReader
getVString()
: com.vertica.sdk.BlockReader
getVStringWriter()
: com.vertica.sdk.BlockWriter
getWriteableBlock()
: com.vertica.sdk.PartitionWriter
, com.vertica.sdk.StreamWriter
getWriter()
: com.vertica.sdk.PlanContext
204 - functions func i
- i -
205 - functions func j
- j -
206 - functions func k
- k -
207 - functions func l
- l -
208 - functions func m
- m -
209 - functions func n
- n -
210 - functions func o
- o -
211 - functions func p
- p -
parseDate()
: com.vertica.sdk.StandardTypeCoercion
parseNumber()
: com.vertica.sdk.StandardTypeCoercion
parseTimestamp()
: com.vertica.sdk.StandardTypeCoercion
plan()
: com.vertica.sdk.FilterFactory
, com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.ParserFactory
, com.vertica.sdk.SourceFactory
prepare()
: com.vertica.sdk.FilterFactory
, com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.ParserFactory
, com.vertica.sdk.SourceFactory
prepareUDSources()
: com.vertica.sdk.SourceFactory
process()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.UDFilter
, com.vertica.sdk.UDParser
, com.vertica.sdk.UDSource
processBlock()
: com.vertica.sdk.ScalarFunction
processPartition()
: com.vertica.sdk.AnalyticFunction
, com.vertica.sdk.TransformFunction
212 - functions func r
- r -
213 - functions func s
- s -
seek()
: com.vertica.sdk.DFSFileReader
, com.vertica.sdk.FileManager
setBool()
: com.vertica.sdk.ParamWriter
setBoolean()
: com.vertica.sdk.BlockWriter
setBooleanEvaluation()
: com.vertica.sdk.StandardTypeCoercion
setBooleanNull()
: com.vertica.sdk.BlockWriter
setBooleanValue()
: com.vertica.sdk.PartitionWriter
setDate()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setDateFormat()
: com.vertica.sdk.StandardTypeCoercion
setDateNull()
: com.vertica.sdk.BlockWriter
setDateParse()
: com.vertica.sdk.StandardTypeCoercion
setDateValue()
: com.vertica.sdk.PartitionWriter
setDefaultTypeCoercion()
: com.vertica.sdk.PartitionWriter
setDouble()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setDoubleNull()
: com.vertica.sdk.BlockWriter
setDoubleValue()
: com.vertica.sdk.PartitionWriter
setFunctionOid()
: com.vertica.sdk.ServerInterface
setIntervalPrecision()
: com.vertica.sdk.VerticaType
setIntervalRange()
: com.vertica.sdk.VerticaType
setLong()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setLongNull()
: com.vertica.sdk.BlockWriter
setLongString()
: com.vertica.sdk.ParamWriter
setLongValue()
: com.vertica.sdk.PartitionWriter
setNull()
: com.vertica.sdk.VString
setNumeric()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setNumericPrecision()
: com.vertica.sdk.VerticaType
setNumericScale()
: com.vertica.sdk.VerticaType
setNumericValue()
: com.vertica.sdk.PartitionWriter
setParamReader()
: com.vertica.sdk.ServerInterface
setPartitionOrderColumnIdx()
: com.vertica.sdk.SizedColumnTypes
setPolicy()
: com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
setRowFromMap()
: com.vertica.sdk.PartitionWriter
setSessionParamReader()
: com.vertica.sdk.ServerInterface
setString()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setStringBytes()
: com.vertica.sdk.PartitionWriter
setStringNull()
: com.vertica.sdk.BlockWriter
setStringValue()
: com.vertica.sdk.PartitionWriter
setTargetNodes()
: com.vertica.sdk.NodeSpecifyingPlanContext
setTimestamp()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
setTimestampInfiniteNeg()
: com.vertica.sdk.BlockWriter
setTimestampInfinitePos()
: com.vertica.sdk.BlockWriter
setTimestampNull()
: com.vertica.sdk.BlockWriter
setTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
setTimestampPrecision()
: com.vertica.sdk.VerticaType
setTimestampValue()
: com.vertica.sdk.PartitionWriter
setUDSessionParameterMap()
: com.vertica.sdk.ServerInterface
setUDSessionParamReaderMap()
: com.vertica.sdk.SessionParamReaderMap
setup()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.SourceIterator
, com.vertica.sdk.UDFilter
, com.vertica.sdk.UDParser
, com.vertica.sdk.UDSource
, com.vertica.sdk.UDXFunction
setValue()
: com.vertica.sdk.PartitionWriter
setVMap()
: com.vertica.sdk.PartitionWriter
size()
: com.vertica.sdk.FileManager
sliceBB()
: com.vertica.sdk.StringUtils
SpecialBigDecimal()
: com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
StandardTypeCoercion()
: com.vertica.sdk.StandardTypeCoercion
str()
: com.vertica.sdk.VString
214 - functions func t
- t -
215 - functions func u
- u -
216 - functions func v
- v -
217 - functions func w
- w -
218 - functions g
Here is a list of all documented class members with links to the class documentation for each member:
- g -
getArgumentColumns()
: com.vertica.sdk.SizedColumnTypes
getBoolean()
: com.vertica.sdk.BlockReader
getBooleanEvaluation()
: com.vertica.sdk.StandardTypeCoercion
getCharset()
: com.vertica.sdk.StringUtils
getClusterNodes()
: com.vertica.sdk.PlanContext
getCode()
: com.vertica.sdk.State.InputState
getColDataAreaRef()
: com.vertica.sdk.VerticaBlock
getColRef()
: com.vertica.sdk.VerticaBlock
getColumnCount()
: com.vertica.sdk.SizedColumnTypes
getColumnName()
: com.vertica.sdk.SizedColumnTypes
getColumnNames()
: com.vertica.sdk.PerColumnParamReader
getColumnParamReader()
: com.vertica.sdk.PerColumnParamReader
getColumnType()
: com.vertica.sdk.SizedColumnTypes
getContinuousReader()
: com.vertica.sdk.ContinuousUDParser
getContinuousRejector()
: com.vertica.sdk.ContinuousUDParser
getDatabaseName()
: com.vertica.sdk.ServerInterface
getDate()
: com.vertica.sdk.BlockReader
getDateFormat()
: com.vertica.sdk.StandardTypeCoercion
getDateParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultDateFormat()
: com.vertica.sdk.StandardTypeCoercion
getDefaultDateParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultPolicy()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
getDefaultTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
getDefaultTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
getDefaultTypeCoercion()
: com.vertica.sdk.PartitionWriter
getDesiredThreads()
: com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.SourceFactory
getDouble()
: com.vertica.sdk.BlockReader
getFunctionOid()
: com.vertica.sdk.ServerInterface
getInlineColBuffer()
: com.vertica.sdk.VerticaBlock
getInstance()
: com.vertica.sdk.IdentComparator
getIntervalPrecision()
: com.vertica.sdk.VerticaType
getIntervalRange()
: com.vertica.sdk.VerticaType
getKey()
: com.vertica.sdk.vmap.InvalidMapKeyException
getLastOrderColumnIdx()
: com.vertica.sdk.SizedColumnTypes
getLastPartitionColumnIdx()
: com.vertica.sdk.SizedColumnTypes
getListIterator()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getLocale()
: com.vertica.sdk.ServerInterface
getLong()
: com.vertica.sdk.BlockReader
getMapIterator()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getMaxSize()
: com.vertica.sdk.VerticaType
getMetaType()
: com.vertica.sdk.NoopTypeCoercion
, com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
getNamespaces()
: com.vertica.sdk.SessionParamReaderMap
, com.vertica.sdk.SessionParamWriterMap
getNodeName()
: com.vertica.sdk.ServerInterface
getNumberOfSources()
: com.vertica.sdk.SourceIterator
getNumCols()
: com.vertica.sdk.VerticaBlock
getNumericLength()
: com.vertica.sdk.VerticaType
getNumericPrecision()
: com.vertica.sdk.Basics
getNumericScale()
: com.vertica.sdk.Basics
getNumericWordCount()
: com.vertica.sdk.Basics
getNumRows()
: com.vertica.sdk.VerticaBlock
getOrderByColumns()
: com.vertica.sdk.SizedColumnTypes
getParameterType()
: com.vertica.sdk.ParserFactory
, com.vertica.sdk.UDXFactory
getParamNames()
: com.vertica.sdk.ParamReader
getParamReader()
: com.vertica.sdk.ServerInterface
getParserReturnType()
: com.vertica.sdk.ParserFactory
getPartitionByColumns()
: com.vertica.sdk.SizedColumnTypes
getPerInstanceResources()
: com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getPhases()
: com.vertica.sdk.MultiPhaseTransformFunctionFactory
getPolicy()
: com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
, com.vertica.sdk.TypeCoercionException
getPortion()
: com.vertica.sdk.UDSource
getPrototype()
: com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getReader()
: com.vertica.sdk.PlanContext
getRejectedRecord()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.UDParser
getReturnType()
: com.vertica.sdk.ScalarFunctionFactory
, com.vertica.sdk.TransformFunctionPhase
, com.vertica.sdk.UDLFactory
, com.vertica.sdk.UDXFactory
getServerInterface()
: com.vertica.sdk.ContinuousUDParser
getSessionParamReader()
: com.vertica.sdk.ServerInterface
getSize()
: com.vertica.sdk.UDSource
getSizeOfSource()
: com.vertica.sdk.SourceIterator
getString()
: com.vertica.sdk.BlockReader
getStringBytes()
: com.vertica.sdk.StringUtils
getStringLength()
: com.vertica.sdk.BlockReader
, com.vertica.sdk.VerticaType
getStringLoc()
: com.vertica.sdk.BlockReader
getTargetNodes()
: com.vertica.sdk.NodeSpecifyingPlanContext
getTimestamp()
: com.vertica.sdk.BlockReader
getTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
getTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
getTimestampPrecision()
: com.vertica.sdk.VerticaType
getType()
: com.vertica.sdk.ParamReader
, com.vertica.sdk.TypeCoercionException
getTypeMetaData()
: com.vertica.sdk.VerticaBlock
getUDSessionParamReader()
: com.vertica.sdk.ServerInterface
, com.vertica.sdk.SessionParamReaderMap
getUDSessionParamReaderMap()
: com.vertica.sdk.ServerInterface
getUDSessionParamWriter()
: com.vertica.sdk.SessionParamWriterMap
getUDXFactoryType()
: com.vertica.sdk.AnalyticFunctionFactory
, com.vertica.sdk.MultiPhaseTransformFunctionFactory
, com.vertica.sdk.ScalarFunctionFactory
, com.vertica.sdk.TransformFunctionFactory
, com.vertica.sdk.UDXFactory
getUri()
: com.vertica.sdk.UnsizedUDSource
getUserName()
: com.vertica.sdk.ServerInterface
getValue()
: com.vertica.sdk.TypeCoercionException
getVNumeric()
: com.vertica.sdk.BlockReader
getVString()
: com.vertica.sdk.BlockReader
getVStringWriter()
: com.vertica.sdk.BlockWriter
getWriteableBlock()
: com.vertica.sdk.PartitionWriter
, com.vertica.sdk.StreamWriter
getWriter()
: com.vertica.sdk.PlanContext
219 - functions i
Here is a list of all documented class members with links to the class documentation for each member:
- i -
220 - functions j
Here is a list of all documented class members with links to the class documentation for each member:
- j -
221 - functions k
Here is a list of all documented class members with links to the class documentation for each member:
- k -
222 - functions l
Here is a list of all documented class members with links to the class documentation for each member:
- l -
223 - functions m
Here is a list of all documented class members with links to the class documentation for each member:
- m -
224 - functions n
Here is a list of all documented class members with links to the class documentation for each member:
- n -
225 - functions o
Here is a list of all documented class members with links to the class documentation for each member:
- o -
226 - functions p
Here is a list of all documented class members with links to the class documentation for each member:
- p -
parseDate()
: com.vertica.sdk.StandardTypeCoercion
parseNumber()
: com.vertica.sdk.StandardTypeCoercion
parseTimestamp()
: com.vertica.sdk.StandardTypeCoercion
PERL
: com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
plan()
: com.vertica.sdk.FilterFactory
, com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.ParserFactory
, com.vertica.sdk.SourceFactory
POSITIVE_INFINITY
: com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
prepare()
: com.vertica.sdk.FilterFactory
, com.vertica.sdk.IterativeSourceFactory
, com.vertica.sdk.ParserFactory
, com.vertica.sdk.SourceFactory
prepareUDSources()
: com.vertica.sdk.SourceFactory
process()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.UDFilter
, com.vertica.sdk.UDParser
, com.vertica.sdk.UDSource
processBlock()
: com.vertica.sdk.ScalarFunction
processPartition()
: com.vertica.sdk.AnalyticFunction
, com.vertica.sdk.TransformFunction
PYTHON
: com.vertica.sdk.StandardTypeCoercion.BooleanEvaluation
227 - functions r
Here is a list of all documented class members with links to the class documentation for each member:
- r -
228 - functions s
Here is a list of all documented class members with links to the class documentation for each member:
- s -
SCALAR
: com.vertica.sdk.TypeCoercion.MetaType
scratchMemory
: com.vertica.sdk.VResources
seek()
: com.vertica.sdk.DFSFileReader
, com.vertica.sdk.FileManager
setBool()
: com.vertica.sdk.ParamWriter
setBoolean()
: com.vertica.sdk.BlockWriter
setBooleanEvaluation()
: com.vertica.sdk.StandardTypeCoercion
setBooleanNull()
: com.vertica.sdk.BlockWriter
setBooleanValue()
: com.vertica.sdk.PartitionWriter
setDate()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setDateFormat()
: com.vertica.sdk.StandardTypeCoercion
setDateNull()
: com.vertica.sdk.BlockWriter
setDateParse()
: com.vertica.sdk.StandardTypeCoercion
setDateValue()
: com.vertica.sdk.PartitionWriter
setDefaultTypeCoercion()
: com.vertica.sdk.PartitionWriter
setDouble()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setDoubleNull()
: com.vertica.sdk.BlockWriter
setDoubleValue()
: com.vertica.sdk.PartitionWriter
setFunctionOid()
: com.vertica.sdk.ServerInterface
setIntervalPrecision()
: com.vertica.sdk.VerticaType
setIntervalRange()
: com.vertica.sdk.VerticaType
setLong()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setLongNull()
: com.vertica.sdk.BlockWriter
setLongString()
: com.vertica.sdk.ParamWriter
setLongValue()
: com.vertica.sdk.PartitionWriter
setNull()
: com.vertica.sdk.VString
setNumeric()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setNumericPrecision()
: com.vertica.sdk.VerticaType
setNumericScale()
: com.vertica.sdk.VerticaType
setNumericValue()
: com.vertica.sdk.PartitionWriter
setParamReader()
: com.vertica.sdk.ServerInterface
setPartitionOrderColumnIdx()
: com.vertica.sdk.SizedColumnTypes
setPolicy()
: com.vertica.sdk.NullTypeCoercion
, com.vertica.sdk.TypeCoercion
setRowFromMap()
: com.vertica.sdk.PartitionWriter
setSessionParamReader()
: com.vertica.sdk.ServerInterface
setString()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setStringBytes()
: com.vertica.sdk.PartitionWriter
setStringNull()
: com.vertica.sdk.BlockWriter
setStringValue()
: com.vertica.sdk.PartitionWriter
setTargetNodes()
: com.vertica.sdk.NodeSpecifyingPlanContext
setTimestamp()
: com.vertica.sdk.BlockWriter
, com.vertica.sdk.ParamWriter
setTimestampFormat()
: com.vertica.sdk.StandardTypeCoercion
setTimestampInfiniteNeg()
: com.vertica.sdk.BlockWriter
setTimestampInfinitePos()
: com.vertica.sdk.BlockWriter
setTimestampNull()
: com.vertica.sdk.BlockWriter
setTimestampParse()
: com.vertica.sdk.StandardTypeCoercion
setTimestampPrecision()
: com.vertica.sdk.VerticaType
setTimestampValue()
: com.vertica.sdk.PartitionWriter
setUDSessionParameterMap()
: com.vertica.sdk.ServerInterface
setUDSessionParamReaderMap()
: com.vertica.sdk.SessionParamReaderMap
setup()
: com.vertica.sdk.ContinuousUDParser
, com.vertica.sdk.SourceIterator
, com.vertica.sdk.UDFilter
, com.vertica.sdk.UDParser
, com.vertica.sdk.UDSource
, com.vertica.sdk.UDXFunction
setValue()
: com.vertica.sdk.PartitionWriter
setVMap()
: com.vertica.sdk.PartitionWriter
size()
: com.vertica.sdk.FileManager
SKIP
: com.vertica.sdk.TypeCoercion.MetaType
sliceBB()
: com.vertica.sdk.StringUtils
SpecialBigDecimal()
: com.vertica.sdk.StandardTypeCoercion.SpecialBigDecimal
StandardTypeCoercion()
: com.vertica.sdk.StandardTypeCoercion
str()
: com.vertica.sdk.VString
229 - functions t
Here is a list of all documented class members with links to the class documentation for each member:
- t -
230 - functions u
Here is a list of all documented class members with links to the class documentation for each member:
- u -
231 - functions v
Here is a list of all documented class members with links to the class documentation for each member:
- v -
232 - functions w
Here is a list of all documented class members with links to the class documentation for each member:
- w -