Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently if there's an ORDER BY and a LIMIT in a nested query, then we get a segfault. The issue is that ORDER BY is converted into a PropertySort, and properties are not pushed down into nested queries. Additionally LIMIT nodes look at the sort expressions and order that is stored in the node itself instead of looking at the required properties during ChildPropertyDeriver::Visit. This creates a disconnect between what the LIMIT nodes in nested queries expects the required properties to be and what they actually are. Relying on the actual properties instead of what's stored in the LIMIT node ensures that the output properties and required properties stay in synce. The result of this change is that nested queries will ignore ORDER BYs unless it is accompanied by a LIMIT. This is due to the fact that the PropertySort will not be pushed down into nested queries, but LIMITs store their own sort information and generate an OrderBy node in the PlanGenerator. Fixes cmu-db#1423
- Loading branch information