[BUG] CLI yields wrong results on a query
まだ誰も着手していません。
評価
調査の方向性
提供された curl コマンドと SQL クエリで問題を再現し、2 回目の実行時に縦形式の出力とテーブル出力を比較します。cli.log、curl.log、ネットワークダンプ、添付された環境の詳細、特に LESS の設定を確認します。同じクエリを繰り返し実行したときに、空白行や古い結果なしで同じ 10 行が表示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What is the bug?
opensearchsqlcli tool yields wrong results for a query. Perhaps, it shows results from a previous query.
How can one reproduce the bug?
- Load this data using
curl:
curl -s -XPOST localhost:9200/_bulk -H 'Content-Type: application/x-ndjson' --data-binary @beer.stackexchange3.txt
- Run query
select * from beer.stackexchange where Tags like '% % %' and Title like '%' LIMIT 10;
- Type y to see results vertically
OK there are 10 entries - Run the same query and hit
Enterto see the results table
There are 25 lines !
Pay attention to mismatch on the first row and on the row count. There is no row wrap.
1 fetched rows / total rows = 10/10
2 +------------+-------------------------+----------------------+---------------------------------------------------------------------------------------+-------------+------->
3 | ParentId | CreationDate | CommunityOwnedDate | Title | ViewCount | LastEd>
4 |------------+-------------------------+----------------------+---------------------------------------------------------------------------------------+-------------+------->
5 | null | 2014-01-21 20:37:12.143 | null | What is the difference between an ale and a lager? | 40787 | null >
6 | null | 2014-01-21 20:45:28.747 | null | Why doesn't bottled beer taste as good as draught beer? | 3867 | null >
7 | | | | | | >
8 | | | | | | >
9 | | | | | | >
10 | | | | | | >
11 | null | 2014-01-21 20:48:46.88 | null | Can one pilsener cause a hangover when another doesn't? | 875 | null >
12 | | | | | | >
13 | | | | | | >
14 | null | 2014-01-21 20:50:01.62 | null | Do different beer glass shapes really make a difference in taste? | 5270 | null >
15 | | | | | | >
16 | | | | | | >
17 | null | 2014-01-21 20:59:16.81 | null | How can I prolong the life of beer in a growler? | 996 | 73 >
18 | null | 2014-01-21 21:00:23.103 | null | What's the difference between a porter and a stout? | 2887 | 73 >
19 | | | | | | >
20 | | | | | | >
21 | null | 2014-01-21 21:05:17.293 | null | Why is it called "porter"? | 764 | 407 >
22 | null | 2014-01-21 21:17:49.747 | null | How much of an impact does the water have on a beer? | 1870 | 52 >
23 | null | 2014-01-21 21:22:24.927 | null | Why does Guinness have a special pouring process / bottle, while other stouts do not? | 1804 | null >
24 | null | 2014-01-21 21:55:27.83 | null | Where can I buy Czech beers in Bavaria? | 86 | 43 >
25 | | | | | | >
26 | | | | | | >
27 | | | | | | >
28 | | | | | | >
29 +------------+-------------------------+----------------------+---------------------------------------------------------------------------------------+-------------+------->
(END)
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
Server: OpenSearch 2.0.0-rc1-SNAPSHOT
CLI Version: 1.0.0
OS: WSL 2.0 on Win 11
Python: 3.8.10
env vars: env.txt
The most interesting i guess are:
LESS=-RSNF
LESSOPEN='|~/.lessfilter %s'
Additional information
Process core dump:
cli_full.zip
Network traffic dump:
dump.zip
CLI log:
cli.log
CURL returns valid output:
curl.log
Note: I didn't execute a query that returns 25 lines.
- 主要言語
- Python
- スター
- 9
- フォーク
- 24
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opensearch-project/sql-cli のほかの issue
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
-
Mend: dependency security vulnerability
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
opensearch-project/sql-cli#59 · コメント 1 件 · リアクション 1 件 ·
-
Update version on PyPi再び着手できるかも @zhongnansu が 186 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンdocumentation enhancement
opensearch-project/sql-cli#45 · コメント 3 件 · 担当者 1 名 ·
opensearch-project/sql-cli の issue をすべて見る
似ている issue
-
python-version
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug javascript P2-medium python release:v3.1
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adrirubio/claude-deck#546 ·
メンテナーはふだん 1 日以内に返信
-
area: desktop area: website priority: P2 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
appandflow/stim#3411 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
baptistehamon/lsapy#185 ·
メンテナーはふだん 1 日以内に返信