-
Notifications
You must be signed in to change notification settings - Fork 95
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
[Python] Querying Dremio with the ADBC Flight SQL client #1559
Comments
What version of ADBC, Python, PyArrow, Dremio, etc. are you using, and on what platform? Are you able to get a stack trace? (You can use py-spy) This is the version of Dremio I havae:
|
Thanks @lidavidm. Curiously, I've just tested it on my home machine (Fedora) and it returns data as expected. The issue only seems to exist on my work machine (Ubuntu 22). As far as I can see I have the same versions of adbc and dremio installed. One other difference is that my work machine uses brew as the package manager and my home machine uses dnf. My instinct is that there is some network policy on my work machine that is blocking the connection, although I am able to authenticate and execute the query (its just returning the results that hangs). I'm also able to query and retrieve results from Dremio on my work machine using the approach documented here: https://github.com/dremio-hub/arrow-flight-client-examples/blob/main/python/example.py#L33 I will work on getting a stack trace using py-spy. |
Oh, sorry, |
|
Thanks. Unfortunately running the dump command requires sudo permissions, which I don't have. I'm going to have to bother someone in our IT department to grant me temporary sudo permissions so I can get the trace dump. |
So, Dremio is telling the client to connect to "0.0.0.0":
Is it possible that one machine routes this to localhost and the other (correctly?) drops this? |
It's possible we should catch and handle this explicitly. There's also apache/arrow#40084 which is supposed to explicitly do what I think Dremio is trying to implicitly do. |
Yes, the behaviour will be as you described, which will likely be invalid. |
Thanks @lidavidm, that is definitely the issue. I look forward to testing the fix once Dremio 24.3.3 lands. |
@stevelorddremio just to clarify by "post Dremio 24.3.3", do you mean to say the fix is included in 24.3.3 or the next release after 24.3.3? I'm assuming the later, as I can't see any reference to this bug fix in the release notes, and I just tested against our cluster (running 24.3.3 Enterprise) and still see the same issue. |
@maxfirman correct. It will be the next release(s) after 24.3.3. |
@zeroshade Looks like the issue we discussed in apache/arrow#40090 will be fixed in Dremio. |
I can confirm that the following now works against Dremio 24.3.4: with connect(
uri="grpc+tls://<dremio-host>:32010",
db_kwargs={
"username": "<username>",
"password": "<password>",
},
) as connection:
with connection.cursor() as cursor:
cursor.execute("select 1")
result = cursor.fetchall()
print(result) Prints:
|
Thanks for the follow-up! |
What would you like help with?
I'm attempting to query Dremio using the ADBC Flight Sql client, however my code hangs when attempting to return a result set.
The following code snippet will reproduce the issue:
I have been testing against a local Dremio instance running in the standalone Docker image:
Note you will have to create an initial user through the Dremio UI:
http://localhost:9047
Interestingly, I can see that the query is being executed successfully when I look at the jobs page in the Dremio UI. However any attempt to subsequently retrieve the data using
fetchall
,fetchone
,fetch_arrow_table
etc... hangs indefinitely.The text was updated successfully, but these errors were encountered: