This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Support lookup indexScan using IN expression as filter #1278
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
czpmango
reviewed
Jul 22, 2021
Aiee
added
ready-for-testing
PR: ready for the CI test
and removed
wip
Solution: work in progress
labels
Jul 22, 2021
jievince
reviewed
Jul 23, 2021
| id | name | dependencies | operator info | | ||
| 3 | Project | 2 | | | ||
| 2 | Filter | 4 | {"condition": "(((player.age==40) OR (player.age==25)) AND ((player.name==\"ABC\") OR (player.name==\"Kobe Bryant\")))"} | | ||
| 4 | TagIndexFullScan | 0 | | |
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.
What's the actual operator info of TagIndexFullScan? Could you paste it here?
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.
TagIndexFullScan
scans the whole tag, so the "columnHints"
is empty.
| 4 | TagIndexFullScan | 0 | ver: 0, rows: 56, execTime: 0us, totalTime: 9707us | outputVar: [ |
| | | | | { |
| | | | | "colNames": [ |
| | | | | "VertexID", |
| | | | | "player.age", |
| | | | | "player.name" |
| | | | | ], |
| | | | | "type": "DATASET", |
| | | | | "name": "__TagIndexFullScan_1" |
| | | | | } |
| | | | | ] |
| | | | | inputVar: |
| | | | | space: 1 |
| | | | | dedup: false |
| | | | | limit: 9223372036854775807 |
| | | | | filter: |
| | | | | orderBy: [] |
| | | | | schemaId: 2 |
| | | | | isEdge: false |
| | | | | returnCols: [ |
| | | | | "_vid", |
| | | | | "age", |
| | | | | "name" |
| | | | | ] |
| | | | | indexCtx: [ |
| | | | | { |
| | | | | "columnHints": [], |
| | | | | "filter": "", |
| | | | | "index_id": 8 |
| | | | | } |
| | | | | ] |
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.
So why does the condition of filter
not be pushed (or be partitially pushed) into IndexScan
?
This PR will be moved to vesoft-nebula repo. |
This PR has been transferred to vesoft-inc/nebula#2906 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
depend on common
PR: this PR depends on PRs in the common repo
ready-for-testing
PR: ready for the CI test
wip
Solution: work in progress
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IN
expression toOR
expression inLOOKUP
if the property in theIN
expression has a valid index:IN
expr:A in [B, C, D] => (A == B) or (A == C) or (A == D)
AND
expr :A in [a, b] AND B => (A==a AND B) OR (A==b AND B)
OR
expr:A in [a, b] OR B => A==a OR A==b OR B
IN
expression will be transformed to arelEQ
expression. e.g.A in [B] => A==B