-
-
Notifications
You must be signed in to change notification settings - Fork 79
IF NOT EXISTS doesn't work for EDGE [@out,@in] index #2721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IF NOT EXISTS doesn't work for EDGE [@out,@in] index #2721
Conversation
Summary of ChangesHello @carlos-rodrigues-8x8, 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 addresses a critical bug in index creation within Arcadedb where the 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
|
🧪 CI InsightsHere's what we observed from your CI run for 3ad0531. 🟢 All jobs passed!But CI Insights is watching 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly passes the ifNotExists flag to the TypeIndexBuilder, which should resolve the issue of creating an index with IF NOT EXISTS when it already exists. I've added a comment suggesting a further simplification by removing a now-redundant check in CreateIndexStatement.java.
Additionally, I've noticed a potential critical issue in CreateIndexStatement.java that is outside of the current changes. The automatic generation of index names on line 81 appears to be buggy and could cause a NullPointerException when creating an index on record attributes like @out or @in, because Property.toString() is called on a list of properties, and it unconditionally calls toString() on a name field that can be null. This is worth investigating in a separate change.
engine/src/main/java/com/arcadedb/query/sql/parser/CreateIndexStatement.java
Show resolved
Hide resolved
|
Great, thanks! |
What does this PR do?
This PR aims to fix an error when creating an index a second time when using the clause IF NOT EXISTS
Motivation
Improving Arcadedb
Related issues
#1601
#1819
Additional Notes
It is necessary to refactor code under
com.arcadedb.query.sql.parser. Found unused code and code that could be simplified.Checklist
mvn clean packagecommand