-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix filter push down project. (#4863)
- Loading branch information
1 parent
6d65a85
commit aa83e95
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2022 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Test push filter down project | ||
|
||
Background: | ||
Given a graph with space named "nba" | ||
|
||
Scenario: push filter down project | ||
When profiling query: | ||
""" | ||
MATCH (n0)-[:like]->(n1) | ||
WHERE (id(n0) IN ["Tim Duncan"]) | ||
WITH n1.player.age AS a0 | ||
WHERE ((a0 - (a0 + ((a0 % a0) + (a0 + a0)))) <= a0) RETURN count(*) | ||
""" | ||
Then the result should be, in any order: | ||
| count(*) | | ||
| 2 | | ||
And the execution plan should be: | ||
| id | name | dependencies | operator info | | ||
| 9 | Aggregate | 12 | | | ||
| 12 | Project | 11 | | | ||
| 11 | Filter | 5 | {"condition": "((-.n1.player.age-(-.n1.player.age+((-.n1.player.age%-.n1.player.age)+(-.n1.player.age+-.n1.player.age))))<=-.n1.player.age)"} | | ||
| 5 | AppendVertices | 4 | | | ||
| 4 | Traverse | 2 | | | ||
| 2 | Dedup | 1 | | | ||
| 1 | PassThrough | 3 | | | ||
| 3 | Start | | | |