-
Notifications
You must be signed in to change notification settings - Fork 11
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
Enable call to PreparedStatement's cancel #137
base: main
Are you sure you want to change the base?
Enable call to PreparedStatement's cancel #137
Conversation
Would you mind rebasing your PR? |
Sure, no problem. |
3c0e7f4
to
8f4f103
Compare
@lpoulain Rebase done. |
@BagusThanatos thanks a lot. Now, I'm trying to reproduce the issue on the latest branch but cannot get the error you describe. I created a question with a text variable (to force the use of prepared statement) and canceled the query but get no error. Are you using a different method? |
@lpoulain For the error to be logged, I had to modify Metabase source code as below, as it only logged Also, if this |
I ran some tests and it works fine. However, for the sake of completeness, |
Signed-off-by: Bagus Nurtomo <bagus.nurtomo@pm.me>
Signed-off-by: Bagus Nurtomo <bagus.nurtomo@pm.me>
8f4f103
to
b49c048
Compare
I've updated the PR, and would appreciate it if you can confirm whether it's the correct place(s). |
Metabase calls PreparedStatement's
.cancel
method in order to stop any queries cancelled by the user as shown herehttps://github.com/metabase/metabase/blob/ceacccd0b1aa4dc51c0c88228f91922fe6934ec0/src/metabase/driver/sql_jdbc/execute.clj#L735
We observed that it failed to cancel with
java.lang.UnsupportedOperationException
which looks like due tocancel
function not currently proxied.Any feedback is appreciated as I'm not familiar with clojure and this is my first interaction with Metabase codebase.
Thank you