davisp commented on issue #153:
URL: https://github.com/apache/arrow-java/issues/153#issuecomment-2524095345

   I've just run into this while adding various language integration tests 
against a FlightSQL server implementation. I'll note that so far both Go and 
Python haven't had any issues without a parameter schema available (though this 
did finally motivate me to implement that bit of the spec).
   
   > * Before we start binding values, we transform the 
`preparedStatement.getParameterSchema()` based on the types of the given 
`TypedValues`. If the Schema is empty/null, we create every Field for the 
schema based on the TypedValue type. Otherwise, we replace all NullType fields 
with a Field based on the TypedValue.
   
   I'm confused why the Java client is attempting to type check anything at 
all. I would think it should be up to the server to decide whether a provided 
type is acceptable or not. One obvious case of this would be whether type 
casting is allowed. Another case is when any type is acceptable like `SELECT 
$1;`. 
   
   I did spend some time reading through the implementation to see if I could 
provide a patch easily enough, but I'm no Java expert and got super lost in the 
whole arrow vector package trying to figure out how it's intended to work. I 
was vaguely surprised by the comment in VectorSchemaRoot acknowledging that 
most (all?) other languages use a RecordBatch for sending parameters. Given 
that its RecordBatch's that are sent across the wire I assume that's some sort 
of JVM optimization? No idea there.
   
   Anywho, if anyone gets around to this, feel free to ping me as I should be 
able to fairly quickly check and proposed patches for fixing this.


-- 
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]

Reply via email to