Proposal: Use MongoDB naming convention#5136
Conversation
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Signed-off-by: Lantao Jin <ltjin@amazon.com>
|
5eadcc5 to
7d49e0d
Compare
7d49e0d to
5eadcc5
Compare
|
@LantaoJin Do we need this PR? Or Just merge to feature branch? |
|
How about this? @penghuo @model-collapse @qianheng-aws after All terms are graph specific. It looks better then Option 2 (ref). For Option 1, we implemented bidirectional traversal in our graph lookup. |
Description
This PR refactors the
graphLookupcommand field names to align with MongoDB's $graphLookup aggregation stage naming convention, improving consistency with industry standards and making the API more intuitive for users familiar with MongoDB.The original field names (
startField,fromField,toField) were ambiguous and didn't clearly convey the relationship between fields. MongoDB's$graphLookupnaming convention iswell-established and more descriptive:
startWith- clearly indicates the initial value to start traversal withconnectFromField- explicitly shows this is the field to recurse throughconnectToField- clearly indicates the field to match againstThis alignment provides better developer experience and reduces confusion for users familiar with graph operations in MongoDB.
Field Name Mapping
startFieldstartWithfromFieldconnectFromFieldtoFieldconnectToFieldExample Query
Before:
After:
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.