 
         let f = plans.first!
         let p = plans.dropFirst().reduce(f) { UnionPlan(lhs: $0, rhs: $1) }
-        
+        if verbose {
+            warn("QueryPlanner plan: " + p.serialize(depth: 0))
+        }
+
         switch query.form {
         case .select(.star):
             return p

            let p = try plan(algebra: child, activeGraph: activeGraph)
            return AggregationPlan(child: p, groups: groups, aggregates: aggs)
        case let .window(child, funcs):
            let p = try plan(algebra: child, activeGraph: activeGraph)
            guard funcs.count == 1, let f = funcs.first else {
                throw QueryError.evaluationError("Unimplmented: Query plan evaluation of multiple window functions")
            }
            
            let app = f.windowApplication
            let partitionComparators = app.partition.map { Algebra.SortComparator(ascending: true, expression: $0) }

        self.evaluator = ExpressionEvaluator(base: base)
        self.freshCounter = sequence(first: 1) { $0 + 1 }
        self.allowStoreOptimizedPlans = true
        self.verbose = false
    }
    
    public func freshVariable() -> Node {
