mirror of https://gitee.com/bigwinds/arangodb
updated CHANGELOG for #2071
This commit is contained in:
parent
71943624b4
commit
a94db7dff6
33
CHANGELOG
33
CHANGELOG
|
@ -3,6 +3,39 @@ devel
|
|||
|
||||
* fixed issue #2071
|
||||
|
||||
make the AQL query optimizer inject filter condition expressions referred to by variables during filter condition aggregation.
|
||||
for example, in the following query
|
||||
|
||||
FOR doc IN collection
|
||||
LET cond1 = (doc.value == 1)
|
||||
LET cond2 = (doc.value == 2)
|
||||
FILTER cond1 || cond2
|
||||
RETURN { doc, cond1, cond2 }
|
||||
|
||||
the optimizer will now inject the conditions for `cond1` and `cond2` into the filter condition `cond1 || cond2`, expanding it to
|
||||
`(doc.value == 1) || (doc.value == 2)` and making these conditions available for index searching.
|
||||
|
||||
note that the optimizer previously already injected some conditions into other conditions, but only if the variable that defined
|
||||
the condition was not used elsewhere. for example, the filter condition in the query
|
||||
|
||||
FOR doc IN collection
|
||||
LET cond = (doc.value == 1)
|
||||
FILTER cond
|
||||
RETURN { doc }
|
||||
|
||||
already got optimized before because `cond` was only used once in the query and the optimizer decided to inject it into the
|
||||
place where it was used.
|
||||
|
||||
this only worked for variables that were referred to once in the query. when a variable was used multiple times, the condition
|
||||
was not injected as in the following query
|
||||
|
||||
FOR doc IN collection
|
||||
LET cond = (doc.value == 1)
|
||||
FILTER cond
|
||||
RETURN { doc, cond }
|
||||
|
||||
the fix for #2070 now will enable this optimization so that the query can use an index on `doc.value` if available.
|
||||
|
||||
* changed behavior of AQL array comparison operators for empty arrays:
|
||||
* `ALL` and `ANY` now always returns `false` when the left-hand operand is an
|
||||
empty array. The behavior for non-empty arrays does not change:
|
||||
|
|
Loading…
Reference in New Issue