query_graph fails with duckdb 2
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
duckdb.query_graph/main.pyから始め、特に、プロファイルのレイテンシが"N/A"に設定されているときに失敗するとトレースバックが示している_generate_metric_grid_htmlを確認してください。DuckDB 2.0.0でissueの再現コマンドを実行し、プロファイルJSONの処理方法を調べてください。query_graphがValueErrorを発生させずにそのプロファイルの可視化を生成できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happens?
We used to be able to run this to get a visualization of the duckdb profiling. It's still mentioned in the documentation: https://duckdb.org/docs/2.0/dev/profiling#query-graphs
But it doesn't work anymore with duckdb 2. #494 says that query_graph is broken but will be fixed before v2.0. I don't think that happened. Are there plans to fix it?
To Reproduce
First run this with duckdb 2:
SET enable_profiling='json';
SET profile_output = '/tmp/profile.json';
SELECT 1;
python -m duckdb.query_graph --profile_input /tmp/profile.json
<frozen runpy>:130: RuntimeWarning: 'duckdb.query_graph.__main__' found in sys.modules after import of package 'duckdb.query_graph', but prior to execution of 'duckdb.query_graph.__main__'; this may result in unpredictable behaviour
Traceback (most recent call last):
File "<frozen runpy>", line 203, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File ".venv/lib/python3.13/site-packages/duckdb/query_graph/__main__.py", line 672, in <module>
main()
~~~~^^
File ".venv/lib/python3.13/site-packages/duckdb/query_graph/__main__.py", line 665, in main
profiling_info.to_html(output_file=output)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File ".venv/lib/python3.13/site-packages/duckdb/query_graph/__main__.py", line 339, in to_html
html_output = self._translate_json_to_html(input_text=profiling_info_text, output_file=output_file)
File ".venv/lib/python3.13/site-packages/duckdb/query_graph/__main__.py", line 594, in _translate_json_to_html
highlight_metric_grid = self._generate_metric_grid_html(text)
File ".venv/lib/python3.13/site-packages/duckdb/query_graph/__main__.py", line 505, in _generate_metric_grid_html
"Execution Time (s)": f"{float(json_graph.get('latency', 'N/A')):.4f}",
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: 'N/A'
OS:
mac arm
DuckDB Package Version:
2.0.0
Python Version:
2.0.0
Full Name:
Gishor Sivanrupan
Affiliation:
Exaforce
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a nightly build
Did you include all relevant data sets for reproducing the issue?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration to reproduce the issue?
- Yes, I have
- 主要言語
- Python
- スター
- 203
- フォーク
- 124
- 平均マージ
- 14時間 14分
- マージ済み PR(30日)
- 70
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
duckdb/duckdb-python のほかの issue
-
`read_json` accepts a list of paths at runtime but the type stub only allows a single path.対応中かも @aleks-drozy が 99 日前に担当しました。 オープンneeds triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
duckdb/duckdb-python#576 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Missing ROW_GROUPS_PER_FILE argument in write_parquet function対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンneeds triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
duckdb/duckdb-python#386 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
duckdb/duckdb-python#753 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
duckdb/duckdb-python#737 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
duckdb/duckdb-python#733 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
duckdb/duckdb-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bytedance/agentkit-samples#277 ·
-
ai-driven-fuzzing bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
-
channels:edit check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Bug] The blue-green mitigation strategy lists catalog names and views before the source tablesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws-samples/sample-aws-genai-db-modernizer#2097 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信