-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Java] jdbc:arrow-flight-sql executeQuery behaves incorrectly #38785
Comments
Upgraded to the latest 14.0.1, problem still exists It seems that Location is not used when initializing FlightStream? |
Hi @xinyiZzz , For the problem with the Location not being used, this was reported in #34532 and recently fixed in #38521 . This fix hasn't been released into a new artifact yet though. For problem 1, I'm not sure if I understand the issue being raised. The acceptPutPreparedStatementUpdate RPC is used when the query supplied is an update-type statement (and if that's the case, you would use either the execute() or executeUpdate() JDBC functions on Statement/PreparedStatement instead of executeQuery()). Or are you saying you are running a SELECT statement with executeQuery() and the driver is issuing the acceptPutPreparedStatementUpdate message instead? |
One thing I noticed while working on this code is that the way we're identifying |
Thanks! , ok, I'll separate later~
That's great! When will this fix be released into a new artifact? , or is there a nightly build that can be used? I want to use it as soon as possible.
Yes, I running a SELECT statement with executeQuery() and the driver is issuing the acceptPutPreparedStatementUpdate message instead. I think as @aiguofer said. |
Great! I reversed the order of Thanks for your attention @aiguofer , ask a question again, it seems that the |
I found nightly builds and will try it: |
Thanks! @jduo , I used nightlies 15.0.0-SNAPSHOT and the problem disappeared, getStream requested other endpoints. |
The As you noticed, It's also used to determine the type of query, which might affect how to execute the query. For example, the JDBC driver doesn't differentiate betwee This does mean that in order for your server to meet the spec you need to include a |
Thanks!, solved all my problems. |
Previously temporarily upgrade Arrow to dev version 15.0.0-SNAPSHOT, because the latest release version Arrow 14.0.1 jdbc:arrow-flight-sql has BUG, jdbc:arrow-flight-sql cannot be used normally, see: apache/arrow#38785 But Arrow 15.0.0-SNAPSHOT was not published to the Maven central repository, and the network could not be connected sometimes, so back to Arrow 14.0.1. jdbc:arrow-flight-sql will be supported after upgrading to Arrow 15.0.0 release version.
Previously temporarily upgrade Arrow to dev version 15.0.0-SNAPSHOT, because the latest release version Arrow 14.0.1 jdbc:arrow-flight-sql has BUG, jdbc:arrow-flight-sql cannot be used normally, see: apache/arrow#38785 But Arrow 15.0.0-SNAPSHOT was not published to the Maven central repository, and the network could not be connected sometimes, so back to Arrow 14.0.1. jdbc:arrow-flight-sql will be supported after upgrading to Arrow 15.0.0 release version.
Describe the bug, including details regarding any error messages, version, and platform.
Arrow Version 13.0.0
I use the following code to connect to flight sql server to execute query, two unexpected behaviors occur:
acceptPutPreparedStatementUpdate
of the flight server is called, andflightStream.getRoot().getRowCount() == 0
is true. but query is not an Update statement.acceptPutPreparedStatementUpdate
be called?I'm using Python DB-API 2.0
cursor.execute(sql)
andcursor.fetchallarrow()
which does not callacceptPutPreparedStatementUpdate
after callingcreatePreparedStatement
.getFlightInfoPreparedStatement
is another flight server, but not fetch result from other flight server. Instead,getStreamStatement
of the current flight server is called.getStreamStatement
called instead ofgetStreamPreparedStatement
?Actual calling sequence:
createPreparedStatement
acceptPutPreparedStatementUpdate
getFlightInfoPreparedStatement
getStreamStatement
closePreparedStatement
I'm looking for help, thanks!
Component(s)
FlightRPC
The text was updated successfully, but these errors were encountered: