jduo commented on code in PR #38733:
URL: https://github.com/apache/arrow/pull/38733#discussion_r1394619966
##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/converter/impl/ListAvaticaParameterConverter.java:
##########
@@ -33,6 +37,22 @@ public ListAvaticaParameterConverter(ArrowType.List type) {
@Override
public boolean bindParameter(FieldVector vector, TypedValue typedValue, int
index) {
+ final List<?> values = (List<?>) typedValue.value;
+
+ if (vector instanceof ListVector) {
+ ListVector listVector = ((ListVector) vector);
+ FieldVector childVector = listVector.getDataVector();
+
+ int startPos = listVector.startNewValue(index);
+ for (int i = 0; i < values.size(); i++) {
+ childVector.getField().getType().accept(
+ new AvaticaParameterBinder.BinderVisitor(
+ childVector,
TypedValue.ofSerial(typedValue.componentType, values.get(i)), startPos + i));
Review Comment:
Does this have the correct behavior if an element in the input list is null?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]