Skip to content
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

QueryProfiler UI can not get query plan according to transaction & statement #246

Open
dingqiangliu opened this issue Apr 14, 2024 · 1 comment

Comments

@dingqiangliu
Copy link

The root cause is the transactions parameter of verticapy.performance.vertica.QueryProfiler requires integer type of transaction_id and statement_id, but current implement of /project/ui/qprof-ui.ipynb set string type of them:

" transactions = (transaction_val, statement_val),\n",

So QueryProfiler._set_request_qd can not search them in database at here:
https://github.com/vertica/VerticaPy/blob/15cba4776fa010991586be30e66a35b190befe32/verticapy/performance/vertica/qprof.py#L1531

Here is the simple fix:

diff --git a/project/ui/qprof-ui.ipynb b/project/ui/qprof-ui.ipynb
index b33e4d6..fa0da54 100644
--- a/project/ui/qprof-ui.ipynb
+++ b/project/ui/qprof-ui.ipynb
@@ -49,7 +49,7 @@
     "        )\n",
     "    elif \"transaction_val\" in globals():\n",
     "        qprof = QueryProfilerInterface(\n",
-    "            transactions = (transaction_val, statement_val),\n",
+    "            transactions = (int(transaction_val), int(statement_val)),\n",
     "            target_schema = target_schema_val_2 if \"target_schema_val_2\" in globals() else None,\n",
     "            key_id = key_val_2 if \"key_val_2\" in globals() else None,\n",
     "        )\n",
@roypaulin
Copy link
Collaborator

@mail4umar have you seen this?

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

No branches or pull requests

2 participants