Comments on: AQL Improvements for ArangoDB 2.7: Enhanced Query Capabilities https://arangodb.com/2015/06/aql-improvements-for-2-7/ The database for graph and beyond Wed, 26 Jun 2024 07:26:47 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: jsteemann https://arangodb.com/2015/06/aql-improvements-for-2-7/#comment-546 Fri, 19 Jun 2015 15:18:00 +0000 http://www.arangodb.com/?p=8006#comment-546 In reply to CoDEmanX.

Re 1: This will depend on the case. In case the inline filters are replacing a subquery (e.g. in case `FOR doc IN collection RETURN { name: doc.name, filteredSubAttributes: (FOR sub IN doc.attr FILTER sub.whatever == 30 RETURN sub.name) }`), they may be faster, because the overhead of a full-blown subquery can be avoided. In other cases, they may be on par with other constructs, and some cases they may be sub-par. We don’t yet have good heuristics yet, but I am pretty sure these operations can be optimized if required.
Re 2: [***********] will flatten up to 10 levels without errors, regardless of how deeply nested the value is. It will go depth-first into the value up to 10 levels deep and pull each member of an array up one level. It won’t recurse further than 10 levels, so nested structures beyond level 10 would remain. Only arrays and sub-arrays will be flattened, so if an array has less than 10 levels of nesting, then this won’t be a problem, and all nested values will be pulled up to the top level.
Re 3: yes, you’re right. The article is adjusted now. Thanks!

]]>
By: CoDEmanX https://arangodb.com/2015/06/aql-improvements-for-2-7/#comment-545 Thu, 18 Jun 2015 17:28:00 +0000 http://www.arangodb.com/?p=8006#comment-545 Wow, great new features! Some questions:
1. Will inline filters be the same speed as their full-blown equivalents?
2. Will something like [***********] flatten levels up to 10 without errors if there are less than that many levels, and what if they have different number of levels?
3. RETURN i in the last snippet is supposed to be RETURN member, isn’t it?

]]>