[Feature] Support graphLookup with literal value as its start#5253
[Feature] Support graphLookup with literal value as its start#5253qianheng-aws wants to merge 4 commits intoopensearch-project:mainfrom
Conversation
PR Reviewer Guide 🔍(Review updated until commit 496a851)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 496a851 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit c9258d9
Suggestions up to commit 98d35f4
Suggestions up to commit dd282e5
Suggestions up to commit d97bd7b
|
…oject#5243) Add support for graphLookup as the first command in a PPL query with literal start values, instead of requiring piped input from source=. Syntax: graphLookup table start="value" edge=from-->to as output graphLookup table start=("v1", "v2") edge=from-->to as output Signed-off-by: Heng Qian <qianheng@amazon.com>
d97bd7b to
dd282e5
Compare
|
Persistent review updated to latest commit dd282e5 |
Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 98d35f4 |
|
Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit c9258d9 |
|
Hello @qianheng-aws Were these intentionally left out? |
No, the agent didn't notice the checklist. Will call out this in the CLAUDE.md. Plan to init a shared CLAUDE.md for this repo #5242 |
|
|
||
| startClause | ||
| : START EQUAL startField = fieldExpression | ||
| : START EQUAL LT_PRTHS searchLiteralList RT_PRTHS |
There was a problem hiding this comment.
remove LT_PRTHS and RT_PRTHS. Comma-list is enough
There was a problem hiding this comment.
IN phrase has PRTH as well. Shall then be consistent?
- Add explain plan tests in CalciteExplainIT with YAML assertions - Add v2-unsupported tests in NewAddedCommandsIT - Add CalcitePPLGraphLookupIT to CalciteNoPushdownIT suite - Skip graphLookup tests when pushdown is disabled (required by impl) - Add expected plan YAML files for piped and top-level graphLookup Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 496a851 |
Description
Adds support for graphlookup as a top-level PPL command (i.e., as the first command in a query without requiring source=). In this mode, the startWith option accepts either a single literal value or a list of literal values to seed the graph traversal. It will get simpler on syntax and also more execution efficiency for there common graph search cases where the start value is already know as a literal.
Syntax
PPL Examples:
Response examples:
Related Issues
Resolves #5243
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.