-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the predicate in PathElement (#81)
### What We haven't been using the `predicate` in the [PathElement](https://hasura.github.io/ndc-spec/reference/types.html#pathelement). This is no good. We need to use it so we don't produce incorrect results to users. ### How We generate a boolean Expression for the predicates using the relevant tables and we `AND` the resulting Expression with the join predicate in the `WHERE` clause.
- Loading branch information
Gil Mizrahi
authored
Oct 19, 2023
1 parent
4cd5ee8
commit 8faaebb
Showing
31 changed files
with
1,290 additions
and
137 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
16 changes: 16 additions & 0 deletions
16
...snapshots/query_tests__sorting__sorting_by_nested_relationship_column_with_predicate.snap
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,16 @@ | ||
--- | ||
source: crates/connectors/ndc-citus/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Crazy Train" | ||
}, | ||
{ | ||
"Name": "I Don't Know" | ||
} | ||
] | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
...ts/query_tests__sorting__sorting_by_nested_relationship_column_with_predicate_exists.snap
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,25 @@ | ||
--- | ||
source: crates/connectors/ndc-citus/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Balls to the Wall" | ||
}, | ||
{ | ||
"Name": "Fast As a Shark" | ||
}, | ||
{ | ||
"Name": "Princess of the Dawn" | ||
}, | ||
{ | ||
"Name": "Restless and Wild" | ||
}, | ||
{ | ||
"Name": "\"?\"" | ||
} | ||
] | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
...s/tests/snapshots/query_tests__sorting__sorting_by_relationship_count_with_predicate.snap
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,25 @@ | ||
--- | ||
source: crates/connectors/ndc-citus/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Iron Maiden" | ||
}, | ||
{ | ||
"Name": "Metallica" | ||
}, | ||
{ | ||
"Name": "U2" | ||
}, | ||
{ | ||
"Name": "Led Zeppelin" | ||
}, | ||
{ | ||
"Name": "Deep Purple" | ||
} | ||
] | ||
} | ||
] |
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
25 changes: 25 additions & 0 deletions
25
...h/tests/snapshots/query_tests__sorting__sorting_by_relationship_count_with_predicate.snap
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,25 @@ | ||
--- | ||
source: crates/connectors/ndc-cockroach/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Iron Maiden" | ||
}, | ||
{ | ||
"Name": "Metallica" | ||
}, | ||
{ | ||
"Name": "U2" | ||
}, | ||
{ | ||
"Name": "Led Zeppelin" | ||
}, | ||
{ | ||
"Name": "Deep Purple" | ||
} | ||
] | ||
} | ||
] |
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
16 changes: 16 additions & 0 deletions
16
...snapshots/query_tests__sorting__sorting_by_nested_relationship_column_with_predicate.snap
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,16 @@ | ||
--- | ||
source: crates/connectors/ndc-postgres/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Crazy Train" | ||
}, | ||
{ | ||
"Name": "I Don't Know" | ||
} | ||
] | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
...ts/query_tests__sorting__sorting_by_nested_relationship_column_with_predicate_exists.snap
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,25 @@ | ||
--- | ||
source: crates/connectors/ndc-postgres/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Balls to the Wall" | ||
}, | ||
{ | ||
"Name": "Fast As a Shark" | ||
}, | ||
{ | ||
"Name": "Princess of the Dawn" | ||
}, | ||
{ | ||
"Name": "Restless and Wild" | ||
}, | ||
{ | ||
"Name": "\"40\"" | ||
} | ||
] | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
...s/tests/snapshots/query_tests__sorting__sorting_by_relationship_count_with_predicate.snap
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,25 @@ | ||
--- | ||
source: crates/connectors/ndc-postgres/tests/query_tests.rs | ||
expression: result | ||
--- | ||
[ | ||
{ | ||
"rows": [ | ||
{ | ||
"Name": "Iron Maiden" | ||
}, | ||
{ | ||
"Name": "Metallica" | ||
}, | ||
{ | ||
"Name": "U2" | ||
}, | ||
{ | ||
"Name": "Led Zeppelin" | ||
}, | ||
{ | ||
"Name": "Deep Purple" | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.