Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Ctrl-C while running query kills python session #56

Open
memeplex opened this issue Mar 16, 2018 · 3 comments
Open

Ctrl-C while running query kills python session #56

memeplex opened this issue Mar 16, 2018 · 3 comments

Comments

@memeplex
Copy link

memeplex commented Mar 16, 2018

Signal handling should be improved if possible, because both:

  1. Being unable to abort at all, and
  2. Abort at the cost of quitting a running REPL

are barely acceptable for interactive usage.

@laughingman7743
Copy link
Owner

Probably it seems that it can be realized by catching the KeyboardInterrupt and canceling the query.
https://github.com/laughingman7743/PyAthenaJDBC/blob/master/pyathenajdbc/cursor.py#L193

Related:
laughingman7743/PyAthena#27

@memeplex
Copy link
Author

If the suggested dependency is pyathena and not pyathenajdbc as you explain in laughingman7743/PyAthena#27, then I see this as a very low priority issue, since Ctrl-C works as expected in pyathena.

@laughingman7743
Copy link
Owner

laughingman7743 commented Mar 25, 2018

Canceling the query is very difficult, because JDBC can not retrieve the query ID.
JDBC driver v1.1.0 can not retrieved query ID by using reflection. 😭

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants