Add C++ stages/expressions and Constant value support#14588
Add C++ stages/expressions and Constant value support#14588wu-hui merged 2 commits intocheryllin/pplfrom
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback. |
Generated by 🚫 Danger |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces C++ stages and expressions, along with constant value support using FSTUserDataReader. The changes touch several files, primarily in the Firestore/Source and Firestore/core directories. Overall, the changes seem well-structured and introduce important new functionality. However, there are several areas that could benefit from closer scrutiny and potential improvement.
Summary of Findings
- Redundant
isUserDataReadchecks: TheisUserDataReadflag and associated logic inFIRConstantBridgeandFIRFunctionExprBridgeseem redundant. TheFSTUserDataReadershould handle the parsing and caching of values, eliminating the need for manual tracking. This could be simplified. - Missing Copyright Header: The new files
aggregate_expressions.h,aggregate_expressions.cc,ordering.h, andordering.ccare missing the standard copyright header. This should be added for consistency. - Potential Memory Leak in
encodeBlob: InFSTUserDataReader.mm, theencodeBlobmethod copies the blob usingnanopb::CopyBytesArray, but it's unclear if the originalByteString's memory is properly managed. This could lead to a memory leak if not handled correctly. - Inconsistent use of
std::move: There are some inconsistencies in the use ofstd::move. For example, inWhereclass constructor instages.h,std::moveis used forexpr_, but not inCollectionSourceconstructor. Consistent use ofstd::movecan improve performance.
Merge Readiness
While the pull request introduces valuable functionality, the issues identified, particularly the potential memory leak and redundant logic, should be addressed before merging. I am unable to approve this pull request, and it should be reviewed and approved by others before merging. Addressing the high and medium severity issues is highly recommended before merging.
4e8c9b7 to
5127bd0
Compare
5127bd0 to
5d701f8
Compare
Uh oh!
There was an error while loading. Please reload this page.