Class DecimalConsumer
java.lang.Object
org.apache.arrow.adapter.jdbc.consumer.BaseConsumer<DecimalVector>
org.apache.arrow.adapter.jdbc.consumer.DecimalConsumer
- All Implemented Interfaces:
AutoCloseable
,JdbcConsumer<DecimalVector>
Consumer which consume decimal type values from
ResultSet
. Write the data to DecimalVector
.-
Field Summary
Fields inherited from class org.apache.arrow.adapter.jdbc.consumer.BaseConsumer
columnIndexInResultSet, currentIndex, vector
-
Constructor Summary
ConstructorDescriptionDecimalConsumer
(DecimalVector vector, int index) Constructs a new consumer.DecimalConsumer
(DecimalVector vector, int index, RoundingMode bigDecimalRoundingMode) Constructs a new consumer, with optional coercibility. -
Method Summary
Modifier and TypeMethodDescriptionstatic JdbcConsumer<DecimalVector>
createConsumer
(DecimalVector vector, int index, boolean nullable, RoundingMode bigDecimalRoundingMode) Creates a consumer forDecimalVector
.protected void
set
(BigDecimal value) Methods inherited from class org.apache.arrow.adapter.jdbc.consumer.BaseConsumer
close, resetValueVector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.arrow.adapter.jdbc.consumer.JdbcConsumer
consume
-
Constructor Details
-
DecimalConsumer
Constructs a new consumer.- Parameters:
vector
- the underlying vector for the consumer.index
- the column id for the consumer.
-
DecimalConsumer
Constructs a new consumer, with optional coercibility.- Parameters:
vector
- the underlying vector for the consumer.index
- the column index for the consumer.bigDecimalRoundingMode
- java.math.RoundingMode to be applied if the BigDecimal scale does not match that of the target vector. Set to null to retain strict matching behavior (scale of source and target vector must match exactly).
-
-
Method Details
-
createConsumer
public static JdbcConsumer<DecimalVector> createConsumer(DecimalVector vector, int index, boolean nullable, RoundingMode bigDecimalRoundingMode) Creates a consumer forDecimalVector
. -
set
-