General codebase fixes#293
General codebase fixes#293hrstoyanov wants to merge 37 commits intoArcadeData:mainfrom hrstoyanov:fixes
Conversation
This reverts commit e7ebd57.
|
Hi @hrstoyanov, thanks for your PR! I quickly looked at some of the commits contained in the PR and they are legit. I can't merge the entire PR because it contains some commits I prefer not to include, like the first commit that undoes some changes you did in your branch but are not relevant in the Also, I see you fixed some issues in the SQL and GraphQL classes, but that code is automatically generated by JavaCC parser every time we modify the SQL/GraphQL grammars, so they would be lost at the very next change to the grammar. I'm going to check one by one commit and cherry-pick the relevant ones. |
|
Thanks Luka. Please cherry pick the commits - this is the best approach. I did try to avoid fixing auto-genetated classes, but I missed - please ignore them. I did not realize how big of PR it is, so it's best to cherry pick and do this in stages. |
|
A few things I can try once you are done with absorbing this batch:
|
lvca
left a comment
There was a problem hiding this comment.
Thanks @hrstoyanov, your contribution is much appreciated! I've finished my one by one commi review and I've already merged most of them. Thanks! I see you reverted the last commit but there were nice changes. WDYT about getting a rebase from main and see if you can send more commits by the topic of change?
|
|
||
| @Override | ||
| protected void handleCorruption(final Exception e, final RID edge, final RID vertex) { | ||
| if ((e instanceof RecordNotFoundException || e instanceof SchemaException) &&// |
There was a problem hiding this comment.
Why did you remove this exception catching?
There was a problem hiding this comment.
@lvca I always start from the latest code in your repo. I will wait for you to finish picking changes for the last 2 PRs, and continue from the latest code base.
engine/src/main/java/com/arcadedb/query/sql/executor/MultiValue.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/com/arcadedb/query/sql/parser/ContainsTextCondition.java
Show resolved
Hide resolved
engine/src/main/java/com/arcadedb/database/async/DatabaseAsyncExecutorImpl.java
Show resolved
Hide resolved
engine/src/main/java/com/arcadedb/query/sql/executor/CartesianProductStep.java
Show resolved
Hide resolved
|
Merged single commits. |
* First working implementation and test cases. Only for the engine. Still missing docs, integration with studio, storing on file and HTTP support. Issue #288 * User function: managed timeout on script execution This prevent infinite loops by mistake and on purpose intended as an attack * js engine: Added another test for the sandbox * Supported Java query engine. This invokes a Java method. Nice to write custom function easy to debug when runs embedded * Custom function: added security registration of allowed classes This avoid to use the java query engine to execute any Java method, but only from the classes registrated beforehand * Hava query engine: improved using of underlying exception * Refactoring to let the user to register the functions with a specific API * Complete refactoring of the function API To have libraries with functions written in different languages. With fluent API it's easier to declare the functions. Also, now functions are registered on a central place, so we could call them from SQL too. * SQL: merged SQLEngine class into SQLQueryEngine. Now SQL can see functions defined in libraries * Added javadoc on Database interface + minor changes to API * Implemented suggestions by @hrstoyanov #293 * Fixed Java engine supported languages * Fixed typo with Javadoc * Fixed compilation problems after rebase * Fixed compilation errors after rebase * fix: resolved merge issues * Fix issue with caching functions * feat: functions can be managed from SQL Issue #288 task 5
What does this PR do?
I ran ArcadeDB through Intellij code inspection and got back a lot of issues.
Motivation
Wanted to improve/modernize the code base.
I did not accept all fixes IntelliJ offered. For example, some of them are related to generics and require more investigation.
Checklist
[X] I have run the build using
mvn clean packagecommand[X] My unit tests cover both failure and success scenarios