[ 
https://issues.apache.org/jira/browse/ARROW-18294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631280#comment-17631280
 ] 

James Henderson commented on ARROW-18294:
-----------------------------------------

Hey, thanks for the quick turnaround! Yep, PR looks good to me - we got another 
error but that looks unrelated:

{code}
1. Unhandled java.lang.NullPointerException
   Cannot read field "columns" because "signature" is null

     AvaticaResultSet.java:   85  
cfjd.org.apache.calcite.avatica.AvaticaResultSet/<init>
ArrowFlightJdbcVectorSchemaRootResultSet.java:   60  
org.apache.arrow.driver.jdbc.ArrowFlightJdbcVectorSchemaRootResultSet/<init>
ArrowFlightJdbcFlightStreamResultSet.java:   64  
org.apache.arrow.driver.jdbc.ArrowFlightJdbcFlightStreamResultSet/<init>
ArrowFlightJdbcFactory.java:   98  
org.apache.arrow.driver.jdbc.ArrowFlightJdbcFactory/newResultSet
ArrowFlightJdbcFactory.java:   38  
org.apache.arrow.driver.jdbc.ArrowFlightJdbcFactory/newResultSet
    AvaticaConnection.java:  566  
cfjd.org.apache.calcite.avatica.AvaticaConnection/executeQueryInternal
AvaticaPreparedStatement.java:  152  
cfjd.org.apache.calcite.avatica.AvaticaPreparedStatement/executeLargeUpdate
AvaticaPreparedStatement.java:  147  
cfjd.org.apache.calcite.avatica.AvaticaPreparedStatement/executeUpdate
{code}

We return -1 as a result count - it seems Avatica is then interpreting that as 
a requirement to create and return a result set, which it can't do without a 
signature - returning any other negative number and our test passes.

> [Java][FlightRPC] 'Signature not found' calling `executeUpdate` on FlightSQL 
> prepared statement
> -----------------------------------------------------------------------------------------------
>
>                 Key: ARROW-18294
>                 URL: https://issues.apache.org/jira/browse/ARROW-18294
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: FlightRPC, Java
>    Affects Versions: 10.0.0
>            Reporter: James Henderson
>            Assignee: David Li
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Hey folks :)
> I'm hitting the 'signature not found' NPE precondition in 
> {{ArrowFlightMetaImpl.execute}} when I prepare a DML statement and call 
> {{executeUpdate}} (the prepare step seems to work fine):
> {code}
>            Preconditions.java:  801  
> cfjd.org.apache.arrow.util.Preconditions/checkNotNull
>      ArrowFlightMetaImpl.java:   86  
> org.apache.arrow.driver.jdbc.ArrowFlightMetaImpl/execute
>      ArrowFlightMetaImpl.java:   96  
> org.apache.arrow.driver.jdbc.ArrowFlightMetaImpl/execute
>        AvaticaConnection.java:  548  
> cfjd.org.apache.calcite.avatica.AvaticaConnection/executeQueryInternal
> AvaticaPreparedStatement.java:  152  
> cfjd.org.apache.calcite.avatica.AvaticaPreparedStatement/executeLargeUpdate
> AvaticaPreparedStatement.java:  147  
> cfjd.org.apache.calcite.avatica.AvaticaPreparedStatement/executeUpdate
> {code}
> It seems that this will always be null in this situation because 
> {{AvaticaPreparedStatement.executeLargeUpdate}} calls 
> {{executeQueryInternal}} with a null signature, regardless of the signature 
> in the prepared statement itself (which is non-null)?
> Otherwise, enjoying playing with FlightSQL so far - thanks!
> James



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to