-
Notifications
You must be signed in to change notification settings - Fork 1
no_fullscanの判定が効かない #52
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
Conversation
Syogo-Suganoya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a-miyashita review me
| function fullscan(records, tables, every) { | ||
| const re = new RegExp( | ||
| `^SCAN TABLE (${(tables || []).join('|') || '\\w+'})` | ||
| `^SCAN(?: TABLE)? (${(tables || []).join('|') || '\\w+'})` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SCAN {テーブル名}でもSCAN TABLE{テーブル名}でも検知するようにしました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
理由
SCAN TABLE {テーブル名}ではなく、SCAN {テーブル名}のフォーマットで出力されます。
EXPLAIN QUERY PLANの結果
不正解時
| id | parent | notused | detail |
|---|---|---|---|
| 2 | 0 | 0 | SCAN sports |
正解時
| id | parent | notused | detail |
|---|---|---|---|
| 3 | 0 | 0 | SEARCH sports USING INDEX sports_name_idx (name=?) |
確認可能なコンテンツ
スポーツ検索システムのデータベース構築をせよ SQL編 で確認可能です。
TCM
https://new.tracks.dev/app/01GGP9MCKKDADZ4HQATZG3FXM3/materials?statuses=2&shipStatuses=shipped&keyword=sql-design-sport&selectedId=2-4990
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
備考
SCAN {テーブル名}になる原因も調査してみましたが、別名テーブルやサブクエリを使用しているとなるようです。
しかし、そのような箇所はないはずなので、原因としては不明なままです。
概要
テストで
no_fullscanを使用しましたが、フルスキャンが行われている際も、正解判定がされます。track-db-test-library/doc/DEVELOPPING_SQL_CHALLENGES_ja.md
Line 468 in 7350016