1
0
Fork 0
Commit Graph

375 Commits

Author SHA1 Message Date
Willi Goesgens 7dac9d8cc7 Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel 2014-10-06 14:16:39 +02:00
Willi Goesgens 48c5ff938e If we clone an ExecutionNode for the same AST we also have to copy the evaluation members, but we don't need a deep-copy. 2014-10-06 14:15:41 +02:00
James 5af60d121e Merge branch 'devel' of ssh://github.com/triAGENS/ArangoDB into devel 2014-10-06 12:57:17 +01:00
James 95fd279a52 distribution node/block declarations etc. 2014-10-06 12:57:09 +01:00
Willi Goesgens 8f74eeff97 Assert whether we have a varoverview. 2014-10-06 13:20:31 +02:00
James 5a070a4e0a remove const-qualified types in VarInfo struct to allow compilation. 2014-10-03 09:27:35 +01:00
Willi Goesgens e1efab6fb5 Fix cloning to other ASTs - dereference pointers to IDs and look up the items on the new lists 2014-10-02 18:41:13 +02:00
Jan Steemann 573d837561 off-by-one fix 2014-10-02 17:06:12 +02:00
Willi Goesgens bc627dda7b Also copy the varoverview to the clone. 2014-10-02 10:40:09 +02:00
Max Neunhoeffer be07d39457 Rename staticAnalysis -> planRegisters. 2014-10-02 00:11:15 +02:00
Jan Steemann 5b0b1f0af5 indenting 2014-10-01 19:06:29 +02:00
Jan Steemann 0d9cdfc87c struct Index 2014-10-01 15:35:16 +02:00
Max Neunhoeffer 993a89fea2 Fix compilation again. 2014-09-30 23:30:55 +02:00
Max Neunhoeffer 4b21832bba Take out unnecessary friend class declarations. 2014-09-30 23:23:46 +02:00
Max Neunhoeffer 8bffb3daa3 Finish transplantation. 2014-09-30 23:20:51 +02:00
Max Neunhoeffer 5676e82872 Make it compile using friend classes. 2014-09-30 20:14:39 +02:00
Max Neunhoeffer 40d7dec7bc Snapshot. 2014-09-30 16:49:12 +02:00
Max Neunhoeffer 5dbcac8efe Start transplantation of _varOverview to ExecutionNodes. 2014-09-30 16:44:01 +02:00
Willi Goesgens 3f566f6289 Enable node* clone functions to produce deep copies which live on a specified query. 2014-09-30 14:09:12 +02:00
Jan Steemann b31987fea7 pass data to RemoteNode 2014-09-29 16:36:52 +02:00
Jan Steemann ec1e6552ca clone plan for DBServers 2014-09-29 15:57:53 +02:00
Jan Steemann 3ac25ad56f fixed some issues with remote queries 2014-09-29 12:14:03 +02:00
Jan Steemann d177bc110c comments 2014-09-29 09:06:06 +02:00
Jan Steemann 9e47f3ca27 Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-09-26 20:23:52 +02:00
Jan Steemann c3ce45e0dd added block instanciation for coordinator, v0.0.0 2014-09-26 20:17:42 +02:00
Willi Goesgens d003eecac1 We need to pass a reference since we want to return values onto this; and return const references to not duplicate the memory. 2014-09-26 15:22:41 +02:00
Jan Steemann 578d22c95b Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel 2014-09-26 13:58:16 +02:00
Jan Steemann f462c5f620 add database and collection info to gather nodes 2014-09-26 13:58:02 +02:00
Willi Goesgens 41fb15d462 Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel 2014-09-26 13:44:16 +02:00
Willi Goesgens 14eda3e348 - create type for SortElements to be used instead of stacked templates
- abstract json parsing of SortElemnts into an own function
 - implement deserialisation of Scatter/GatherNode
2014-09-26 13:42:26 +02:00
Max Neunhoeffer 5c7d058043 Add stubs for RemoteBlock. 2014-09-26 13:34:08 +02:00
Max Neunhoeffer e9bac83e67 Merge branch 'devel' of ssh://github.com/triAGENS/ArangoDB into devel 2014-09-26 13:23:33 +02:00
Max Neunhoeffer c4fd3e7553 First steps towards RemoteBlock. 2014-09-26 13:23:21 +02:00
Willi Goesgens 53ee658be0 Implement moving of sortnode into the clusterable part of the query; add elements to the json serialisation of the gather node 2014-09-26 12:35:58 +02:00
James b7a1247252 adding variables/sort direction in _elements to GatherNode. 2014-09-23 17:31:27 +01:00
Jan Steemann 5c552d4137 optimizer rule for scatter / gather 2014-09-17 17:29:36 +02:00
Jan Steemann bd62c36771 scatter / gather 0.0 2014-09-17 16:00:54 +02:00
Jan Steemann db70b9bfcb added not-yet used nodes for remote, scatter and gather 2014-09-17 14:31:37 +02:00
Jan Steemann 654c2ba0fe backwards iteration, not yet working 2014-09-17 00:40:24 +02:00
Willi Goesgens c71d142b51 We missed to output the modification options vector. 2014-09-16 18:25:41 +02:00
Jan Steemann 54b5e7b034 slightly improved access to dynamic bounds 2014-09-16 15:10:43 +02:00
Max Neunhoeffer 855a695764 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionBlock.cpp
	arangod/Aql/RangeInfo.cpp
	arangod/Aql/RangeInfo.h
2014-09-15 16:16:21 +02:00
Willi Goesgens 8bad042d08 Remove friend declaration since it seems not to be needed anyways. 2014-09-15 13:42:21 +02:00
Max Neunhoeffer 9bfd5eb8c6 Improve comments for getVarusage and friends. 2014-09-15 13:37:16 +02:00
Jan Steemann 5a1dc63946 fixed tons of compile errors in VS 2014-09-15 12:04:49 +02:00
Jan Steemann 6552490cbe Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.cpp
	arangod/Aql/ExecutionNode.h
	arangod/Aql/ExecutionPlan.cpp
	arangod/Aql/OptimizerRules.cpp
2014-09-12 15:17:50 +02:00
Jan Steemann a5c52998e8 remove redundant calculations 2014-09-12 15:10:48 +02:00
Max Neunhoeffer 35ffe6b9e4 Restructure who has Ast and ExecutionPlan.
Not compiling yet.
2014-09-12 14:44:20 +02:00
Max Neunhoeffer 247f739bee Sort out variable usage in variable bound expressions.
Not yet compiling, need to sort out access to the Ast object.
2014-09-12 11:21:52 +02:00
Max Neunhoeffer e120da8a23 Note what needs doing to fix bug with variable lookup. 2014-09-12 00:59:59 +02:00
Jan Steemann 34beb65148 use primary index & edge index 2014-09-11 17:01:53 +02:00
Max Neunhoeffer 31e02e42cb Instanciate expressions for variable bounds.
And various cleanups.
2014-09-11 14:28:38 +02:00
Max Neunhoeffer 5ff594f3bc Add some debugging output. 2014-09-10 16:36:12 +02:00
Jan Steemann ba21bf4019 fixed cloning of IndexRangeNodes 2014-09-10 10:54:32 +02:00
Willi Goesgens de32cddc1e Fix memory leak in case of exceptions thrown when parsing the variable from json 2014-09-09 13:22:49 +02:00
Jan Steemann 639a026c66 fixed tests 2014-09-09 09:57:52 +02:00
Jan Steemann 4bda3e3979 finished test for remove-redundant-sorts 2014-09-08 17:33:11 +02:00
Willi Goesgens ebbb9c34b6 Redundand-Sort: implement removing of left item superseeding the sort 2014-09-04 17:53:20 +02:00
Willi Goesgens 30b33a1793 Fix buffer overrun while comparing two sortNodes 2014-09-04 17:29:22 +02:00
Max Neunhoeffer 7e7b47ab71 Sort out negative cost estimations. 2014-09-02 10:15:02 +02:00
Jan Steemann 822c5daa32 assert costs are positive 2014-09-01 15:03:23 +02:00
James fd4b4e5df4 "proper" estimateCost method for IndexRangeNode. 2014-08-29 14:22:46 +02:00
Jan Steemann e47c2b99d3 use stable sort 2014-08-29 12:22:27 +02:00
James 46b40015ee renovating RangeInfo stuff to avoid mem leaks. 2014-08-29 11:52:19 +02:00
James b25f9d8301 fixed bug in last. 2014-08-29 09:34:23 +02:00
James 58a288fe77 copying a RangeIndexNode now properly copies the range infos. 2014-08-29 09:26:11 +02:00
James 05dac4f52d Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/Optimizer.cpp
2014-08-28 14:41:51 +02:00
James 1deed3ebce fixed bugs useIndexRange. 2014-08-28 14:39:26 +02:00
Jan Steemann ca814c9733 remove-redundant-sorts 2014-08-28 13:54:17 +02:00
Jan Steemann 2eb38c9657 remove-redundant-sorts, initial 2014-08-28 12:39:28 +02:00
Willi Goesgens 9d4b1b1c88 SortNode: our variables can also be in other ExecutionNodes then the Calculation node. Take this into account.
SortIndex optimizer: when looking at our properties only check Calculation nodes, ignore other types of ExecutionNodes
2014-08-28 11:48:23 +02:00
James ee3a401c88 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-08-28 09:48:49 +02:00
James 511f08e4ca adding stub for estimateCost for IndexRangeNode. 2014-08-28 09:48:05 +02:00
Jan Steemann 6d0dfcdeba changed ctor 2014-08-28 00:27:24 +02:00
Jan Steemann 1e0a393d48 fixed wrong comment 2014-08-27 23:54:32 +02:00
Willi Goesgens e67a2ed36a SortIndex optimizer:
- remove SortNodes which are superseeded by an IndexRangeNode
  - calculate the properties of an SortNode before entering the walker
  - add abstraction class
2014-08-27 15:39:37 +02:00
Max Neunhoeffer 27d8409425 Implement canThrow method for SubqueryNode. 2014-08-27 13:07:05 +02:00
Willi Goesgens 5e75ec8bb5 Expression:
- add function isSimpleAccessReference() to check whether it is a coll.attr.attr
 - add function getAccessNRef() to retrieve pair("attr.attr", "coll"),
SortIndex optimizer:
 - use the new functionality to get better readable code.
rename indexes -> indices
2014-08-26 17:26:46 +02:00
Willi Goesgens 18d308af0f SortNode: add method that looks up the expressions referenced by the Sortnode, and returns them paired with ASC/DESC. 2014-08-26 15:38:55 +02:00
Willi Goesgens ff4e00eb86 SortIndex optimizer:
- rename getIndexes to getIndexesUnordered
  - add CompareIndex & getIndexesOrdered to retrieve a list which does an ordered match on the available skiplist indices
  - fetch the ordered matching indices
  - only remove the sortnode if its a full qualified match.
2014-08-26 13:53:19 +02:00
Willi Goesgens 27063a08b5 SortIndex optimizer:
- group the ASC/DESC
 - find out the real attribute name for nested attributes
2014-08-26 09:48:20 +02:00
Willi Goesgens 10603f904d Walker: the process of walking now is aborted if the before-hook returns true. 2014-08-25 15:48:21 +02:00
James 8896a01753 making the arguments of IndexRangeNode more general. 2014-08-25 15:11:54 +02:00
Max Neunhoeffer 4b229c5873 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	lib/Basics/JsonHelper.h
2014-08-22 17:02:06 +02:00
Max Neunhoeffer 8fd6cd1184 Implement clear unneeded registers. 2014-08-22 17:00:53 +02:00
James 931aaee618 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-22 16:19:01 +02:00
James 4c49a3be5e deserialising of IndexRangeNode almost completed. 2014-08-22 16:17:10 +02:00
Jan Steemann 55608ceae2 use index nodes 2014-08-22 13:53:01 +02:00
Jan Steemann 3a60913afe fix JSON serialization of indexes 2014-08-22 13:13:07 +02:00
James 4ba4ec4523 moving function getIndexes for EnumerateCollectionNode from h to cpp file. 2014-08-22 10:39:41 +02:00
James 1afad665fa putting RangeInfo stuff into new file. 2014-08-22 10:34:03 +02:00
James fecaccf37f fixing comparison of bounds. 2014-08-21 18:40:02 +02:00
James 89ba89bf77 added method to check if a range info contains a unique value, and cleaned up FilterToEnumCollFinder. 2014-08-21 17:39:06 +02:00
James 409e663818 fixed bugs in comparison of tightness of range bounds, and made it so that invalid ranges insert NoResultNode in the plan. 2014-08-21 17:14:42 +02:00
James 053ab548ba Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 15:48:58 +02:00
James 102e866a89 adding canThrow methods for ExecutionNodes. 2014-08-21 15:46:41 +02:00
James 4d17c347cc bug fixes in last. 2014-08-21 15:38:42 +02:00
James deaa8f1271 only applying hash indexes if ranges indicate equality. 2014-08-21 15:27:53 +02:00
Max Neunhoeffer 321ab35551 Finish _parents in ExecutionNodes business. 2014-08-21 15:15:46 +02:00
Max Neunhoeffer 3007899abe Make an ExecutionNode store its parents. 2014-08-21 13:51:37 +02:00
James 7b5f52069a Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 13:16:24 +02:00
Jan Steemann 0e8b61124e less verbose AST dumps in AQL_PARSE 2014-08-21 13:08:21 +02:00
James aa03c16be0 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/OptimizerRules.cpp
2014-08-21 12:53:05 +02:00
James c4811009a8 fixing replaceNode for ExecutionPlan. 2014-08-21 12:32:07 +02:00
Jan Steemann 1edd170317 turned off optimization 2014-08-21 11:21:03 +02:00
James a8801803dd more IndexRangeNode stuff 2014-08-21 11:16:39 +02:00
Max Neunhoeffer 52f48cd296 Add NoResultsNode. 2014-08-21 10:17:18 +02:00
Jan Steemann 670b407185 disable filters that never produce results 2014-08-20 18:24:52 +02:00
James b5d4fc52d1 added clone method for execution plan, removed debug prints. 2014-08-20 16:34:35 +02:00
James 260c790bc5 fixed bugs in last. 2014-08-20 16:13:53 +02:00
Jan Steemann 3fe8831a03 fixed optimizer bug due to duplicate variable representation 2014-08-20 14:18:33 +02:00
James 24b2dd1906 finding index in CalculationNodeFinder. 2014-08-20 11:38:02 +02:00
Willi Goesgens 0ad6da9427 Json Serialisation: Use helper function to read variables from the json 2014-08-20 10:57:59 +02:00
Jan Steemann 592ada1d36 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-08-19 18:58:32 +02:00
Jan Steemann 99ce138c12 fixed creation of subqueries from JSON input 2014-08-19 18:51:11 +02:00
James 447282d0bd Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/Optimizer.cpp
	arangod/Aql/OptimizerRules.cpp
2014-08-19 17:00:16 +02:00
James c0ce6d361c AND working for IndexRangeNode. 2014-08-19 16:58:10 +02:00
Willi Goesgens f179c35f02 Follow changes in Replace & UpdateNode - they have inDoc/inKey/out Variable now.
Merge branch 'aql2' of github.com:triAGENS/ArangoDB into aql2

Conflicts:
	arangod/Aql/ExecutionPlan.cpp
2014-08-19 16:19:38 +02:00
Willi Goesgens 1a6487ab14 Json de/serialization 2014-08-19 16:09:37 +02:00
James 370892566f added new class to contain ranges, and take their intersections. 2014-08-19 15:53:17 +02:00
Jan Steemann 79e68e72e3 fixed removeUnnecessaryCalc 2014-08-19 15:46:04 +02:00
Jan Steemann e4abcdc843 added optimizer rule 2014-08-19 13:59:05 +02:00
James 857083adc9 starting to add optimizer rules which create IndexRangeNodes. 2014-08-19 12:02:50 +02:00
James 04b396f65e adding RangeInfoBound to clean things up. 2014-08-19 11:01:06 +02:00
James ad8e179cf1 adding unbounded ranges info for IndexRangeNode. 2014-08-18 17:18:58 +02:00
Jan Steemann 0666708206 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-18 14:27:37 +02:00
Jan Steemann e6e78811b5 fixed replace 2014-08-18 14:27:23 +02:00
James fb1d69bbae Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-18 14:12:10 +02:00
James 13aeacc43c fixed compiler errors, and working on IndexRangeNode. 2014-08-18 14:12:00 +02:00
Jan Steemann 7b3389b55c modification queries 2014-08-18 13:52:41 +02:00
Jan Steemann bdfef136bf Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-18 12:34:41 +02:00
Jan Steemann b010518e9e implementation of update/replace (update not yet merging old attributes) 2014-08-18 12:34:27 +02:00
James 8f6fd0e4c4 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-18 11:11:46 +02:00
James a79f72087d adding Index caching, and cleaning up last. 2014-08-18 10:46:47 +02:00
Max Neunhoeffer 9e91d9bba3 Finish first optimization rule: remove unnecessary calcs.
So far not activated, because test suite crashes.
Need to look into details.
2014-08-16 00:09:11 +02:00
Jan Steemann b1aceb9771 Merge branch 'aql2' of https://github.com/triAGENS/ArangoDB into aql2 2014-08-15 18:13:11 +02:00
Jan Steemann 9348f12f78 implemented insert node 2014-08-15 18:12:33 +02:00
Max Neunhoeffer f671fb7e36 Add the first actual optimization rule (as a stub). 2014-08-15 16:54:53 +02:00
Max Neunhoeffer af2c9d1a92 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-15 16:10:12 +02:00
Max Neunhoeffer 92f3ca5dc8 Fix bug in varUsageFinder. 2014-08-15 16:09:58 +02:00
James ac58a0a9d3 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-15 15:31:31 +02:00
James c128cc716e version of IndexRangeNode accepting range information as an argument. 2014-08-15 15:31:23 +02:00
Max Neunhoeffer ceff1481ed Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-15 13:55:21 +02:00
James 6bbbc34150 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-08-15 13:54:50 +02:00
James 47244fb48e initial version of IndexRangeNode. 2014-08-15 13:52:52 +02:00
Max Neunhoeffer 8d080714a6 Add varUsage information to ExecutionNodes. 2014-08-15 13:29:26 +02:00
James a0db57b7f9 adding an Index object, and initial IndexRangeNode. 2014-08-15 12:57:52 +02:00
Jan Steemann 773c29cecf further work on RemoveNode 2014-08-15 12:20:17 +02:00
Max Neunhoeffer fcdf57ff09 Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionEngine.cpp
2014-08-14 15:07:10 +02:00
Max Neunhoeffer f248792865 Make WalkerWorker a template class.
Implement findNodesOfType for ExecutionPlans.
2014-08-14 15:04:59 +02:00
Jan Steemann 0546e9d8ff implemented stub of RemoveBlock 2014-08-14 14:46:53 +02:00
Jan Steemann 93cfa9e2e4 count number of documents in collection 2014-08-14 13:53:21 +02:00
James 9dc437f19a Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-14 10:52:05 +02:00
James 8bb501468f Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
Conflicts:
	arangod/Aql/ExecutionNode.h
2014-08-14 10:51:49 +02:00
Jan Steemann 0a850501b6 added override specifier 2014-08-14 10:32:41 +02:00
James 8f5c31e740 added caching of estimatedCost. 2014-08-14 10:29:47 +02:00
Jan Steemann 1ad300cee5 added more node types 2014-08-14 10:23:53 +02:00
Jan Steemann dfe7ec46a5 added RemoveNode 2014-08-14 09:39:58 +02:00
Jan Steemann 10da82fae0 removed unused and non-working operator[] 2014-08-13 18:57:14 +02:00
James 0403c54220 can't use this[0] in last. 2014-08-13 18:39:09 +02:00
James 66794f9374 more estimateCost. 2014-08-13 18:28:22 +02:00
James c8a7779b14 initial framework for estimateCost method for execution nodes. 2014-08-13 17:38:15 +02:00
Jan Steemann 7feea4c640 fixed [] attribute access 2014-08-12 14:02:46 +02:00
Jan Steemann 8b830974c7 fixed parser errors 2014-08-08 20:12:10 +02:00
Jan Steemann 61d8998909 aggregate! 2014-08-08 18:56:41 +02:00
Max Neunhoeffer 83a60e578e Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2 2014-08-07 11:56:50 +02:00
Max Neunhoeffer 1d6f7bc3d2 Sort out bind as a preparation for subqueries. 2014-08-07 11:56:26 +02:00
Jan Steemann 8e229ec2b2 stringification of function parameters 2014-08-07 11:44:22 +02:00
Max Neunhoeffer 7b65a958d8 Take care of static analyis case AggregateNode. 2014-08-06 15:13:22 +02:00
Jan Steemann d623d1a0ab renamed things 2014-08-06 09:42:06 +02:00
Max Neunhoeffer fabfeae14d Add LimitNode. Implement skip generically. 2014-08-04 16:34:37 +02:00
Jan Steemann 8de760bf1b added expression function 2014-08-01 13:58:51 +02:00
Jan Steemann 69c55d754c renamed "root" to "return" 2014-08-01 12:23:55 +02:00
Max Neunhoeffer e7e98262ea Redo instanciator using Walker and in ExecutionEngine. 2014-08-01 11:56:39 +02:00
Max Neunhoeffer 5bf0ff1a7c Rename files ExecutionPlan -> ExecutionNode 2014-08-01 11:26:09 +02:00