aiguofer commented on code in PR #38404:
URL: https://github.com/apache/arrow/pull/38404#discussion_r1379420165
##########
java/flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/converter/impl/DateAvaticaParameterConverter.java:
##########
@@ -35,12 +35,12 @@ public DateAvaticaParameterConverter(ArrowType.Date type) {
@Override
public boolean bindParameter(FieldVector vector, TypedValue typedValue, int
index) {
- Object value = typedValue.toLocal();
+ int value = (int) typedValue.toLocal();
Review Comment:
Avatica converts all values internally to a more efficient type. They
provide a conversion matrix:
https://calcite.apache.org/avatica/javadocAggregate/org/apache/calcite/avatica/remote/TypedValue.html
From digging into the code, the matrix doesn't always seem correct, but
looking at the `toLocal` code provides a pretty good representation of how
different objects are handled. There's also a `jdbc` representation, but that
converts objects back to specific types, which seemed redundant since we're
converting to Arrow types.
In some cases (mainly numeric types) I chose to ignore the `toLocal` method
and do the conversion myself.
--
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]