Class JdbcToArrowConfig
The allocator is used to construct the VectorSchemaRoot
, and
the calendar is used to define the time zone of any ArrowType.Timestamp
fields that are created during the
conversion. Neither field may be null
.
If the includeMetadata
flag is set, the Arrow field metadata will contain
information from the corresponding ResultSetMetaData
that was used to create the
FieldType
of the corresponding FieldVector
.
If there are any Types.ARRAY
fields in the ResultSet
, the
corresponding JdbcFieldInfo
for the array's contents must be defined here. Unfortunately,
the sub-type information cannot be retrieved from all JDBC implementations (H2 for example,
returns Types.NULL
for the array sub-type), so it must be configured here. The
column index or name can be used to map to a JdbcFieldInfo
, and that will be used for the
conversion.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for a function that gets a JDBC consumer for the given values. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionThe Arrow memory allocator.getArraySubTypeByColumnIndex
(int index) Returns the array sub-typeJdbcFieldInfo
defined for the provided column index.Returns the array sub-typeJdbcFieldInfo
defined for the provided column name.Return metadata from columnIndex->meta map on per field basis or null if not provided.getExplicitTypeByColumnIndex
(int index) Returns the typeJdbcFieldInfo
explicitly defined for the provided column index.Returns the typeJdbcFieldInfo
explicitly defined for the provided column name.Gets the JDBC consumer getter.Gets the mapping between JDBC type information to Arrow type.Return schema level metadata or null if not provided.int
Get the target batch size for partial read.boolean
Get whether it is allowed to reuse the vector schema root.boolean
Whether to include JDBC ResultSet field metadata in the Arrow Schema field metadata.
-
Field Details
-
DEFAULT_TARGET_BATCH_SIZE
public static final int DEFAULT_TARGET_BATCH_SIZE- See Also:
-
NO_LIMIT_BATCH_SIZE
public static final int NO_LIMIT_BATCH_SIZE- See Also:
-
-
Method Details
-
getCalendar
The calendar to use when defining Arrow Timestamp fields and retrievingDate
,Time
, orTimestamp
data types from theResultSet
, ornull
if not converting.- Returns:
- the calendar.
-
getAllocator
The Arrow memory allocator.- Returns:
- the allocator.
-
shouldIncludeMetadata
public boolean shouldIncludeMetadata()Whether to include JDBC ResultSet field metadata in the Arrow Schema field metadata.- Returns:
true
to include field metadata,false
to exclude it.
-
getTargetBatchSize
public int getTargetBatchSize()Get the target batch size for partial read. -
isReuseVectorSchemaRoot
public boolean isReuseVectorSchemaRoot()Get whether it is allowed to reuse the vector schema root. -
getJdbcToArrowTypeConverter
Gets the mapping between JDBC type information to Arrow type. -
getJdbcConsumerGetter
Gets the JDBC consumer getter. -
getArraySubTypeByColumnIndex
Returns the array sub-typeJdbcFieldInfo
defined for the provided column index.- Parameters:
index
- TheResultSetMetaData
column index of anTypes.ARRAY
type.- Returns:
- The
JdbcFieldInfo
for that array's sub-type, ornull
if not defined.
-
getArraySubTypeByColumnName
Returns the array sub-typeJdbcFieldInfo
defined for the provided column name.- Parameters:
name
- TheResultSetMetaData
column name of anTypes.ARRAY
type.- Returns:
- The
JdbcFieldInfo
for that array's sub-type, ornull
if not defined.
-
getExplicitTypeByColumnIndex
Returns the typeJdbcFieldInfo
explicitly defined for the provided column index.- Parameters:
index
- TheResultSetMetaData
column index to evaluate for explicit type mapping.- Returns:
- The
JdbcFieldInfo
defined for the column, ornull
if not defined.
-
getExplicitTypeByColumnName
Returns the typeJdbcFieldInfo
explicitly defined for the provided column name.- Parameters:
name
- TheResultSetMetaData
column name to evaluate for explicit type mapping.- Returns:
- The
JdbcFieldInfo
defined for the column, ornull
if not defined.
-
getSchemaMetadata
Return schema level metadata or null if not provided. -
getColumnMetadataByColumnIndex
Return metadata from columnIndex->meta map on per field basis or null if not provided. -
getBigDecimalRoundingMode
-