fixed offset logic in psycopg parametersCypher array, fixes #2657#2658
fixed offset logic in psycopg parametersCypher array, fixes #2657#2658robfrank merged 2 commits intoArcadeData:mainfrom
Conversation
Summary of ChangesHello @ExtReMLapin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical bug related to the construction of parameter arrays for Cypher queries executed through the PostgreSQL interface. The change ensures that parameters are correctly mapped and passed, preventing potential issues with query execution due to incorrect data indexing. This fix directly addresses the problem described in issue #2657. Highlights
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 by creating a comment 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a critical bug in the construction of parameters for Cypher queries via the PostgreSQL protocol. The previous logic incorrectly indexed the parameter array, causing parameters to be overwritten. The fix corrects the index calculation, ensuring that all parameters are correctly passed. The change is correct and effectively resolves the issue. I've added one minor suggestion to improve code clarity by using String.valueOf() for type conversion.
postgresw/src/main/java/com/arcadedb/postgres/PostgresNetworkExecutor.java
Show resolved
Hide resolved
|
To be frank, the less modifications I have, the better I feel, not sure if the gemini suggestions are good or not, as either way it wasn't there before I commited, and it probably had the opportunity to give those suggestions to the previous commiter. |
|
do you think we can add a test on https://github.com/ArcadeData/arcadedb/blob/main/e2e-python/tests/test_arcadedb.py to enrich the suite? Or it's so minor that is covered by actual tests? |
|
Done And it reveals another issue :v
|
|
The proposed fix has been validated; all tests are passing in the continuous integration (CI) environment. Please note that the test suite depends on a new Docker image that is built by the CI pipeline, so a local build of the image is required to replicate these results. To build a fresh image locally without executing all the tests: mvn clean install -DskipTests -Pdocker |
|
Thank you very much @ExtReMLapin |
fixes #2657
To be frank, considering the "complexity" of the commit, I just tested it, didn't bother running all tests