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
Query Fails on Upsert with Replace_nth #13632
Comments
Using latest 3.7, the "Expecting Array slice" exception comes from here:
|
Bugfix patch: diff --git a/arangod/Aql/Functions.cpp b/arangod/Aql/Functions.cpp
index 9ed344028c..c5db143d79 100644
--- a/arangod/Aql/Functions.cpp
+++ b/arangod/Aql/Functions.cpp
@@ -7340,9 +7340,10 @@ AqlValue Functions::ReplaceNth(ExpressionContext* expressionContext,
THROW_ARANGO_EXCEPTION_PARAMS(TRI_ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH, AFN);
}
- AqlValueMaterializer materializer(trx);
- VPackSlice arraySlice = materializer.slice(baseArray, false);
- VPackSlice replaceValue = materializer.slice(newValue, false);
+ AqlValueMaterializer materializer1(trx);
+ VPackSlice arraySlice = materializer1.slice(baseArray, false);
+ AqlValueMaterializer materializer2(trx);
+ VPackSlice replaceValue = materializer2.slice(newValue, false);
transaction::BuilderLeaser builder(trx);
builder->openArray();
@@ -7359,6 +7360,7 @@ AqlValue Functions::ReplaceNth(ExpressionContext* expressionContext,
uint64_t pos = length;
if (replaceOffset >= length) {
+ AqlValueMaterializer materializer(trx);
VPackSlice paddVpValue = materializer.slice(paddValue, false);
while (pos < replaceOffset) {
builder->add(paddVpValue); |
@arango-db-us3r : Fixed via the above PRs. The bugfix is to supposed to appear in release 3.7.10. |
This was
linked to
pull requests
Mar 11, 2021
Merged
Merged
This was
unlinked from
pull requests
Mar 11, 2021
Merged
Merged
jsteemann
added a commit
that referenced
this issue
Mar 11, 2021
jsteemann
added a commit
that referenced
this issue
Mar 12, 2021
Hi @arango-db-us3r, Version 3.7.10, which includes a fix for this issue, has been released. Please let us know whether your query works as expected. |
Yes, this fix allowed my query to work as expected, thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My Environment
Component, Query & Data
Affected feature:
AQL query using web interface and python driver
AQL query (if applicable):
AQL explain and/or profile (if applicable):
Dataset:
Dataset temp is newly created and empty
Size of your Dataset on disk:
0B
Replication Factor & Number of Shards (Cluster only):
N/A
Steps to reproduce
Problem:
Query does not finish, giving the generic error:
Query: Expecting Array slice (while executing) (exception location: /work/ArangoDB/arangod/RestHandler/RestCursorHandler.cpp:320). Please report this error to arangodb.com
Expected result:
Query to finish without error
The text was updated successfully, but these errors were encountered: