void makeVtableModeSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo,
JobStepVector& querySteps, JobStepVector& projectSteps, DeliveredTableMap& deliverySteps)
// @bug4848, enhance and unify limit handling.
// if (csep->limitNum() != (uint64_t) - 1) // change: commented out
and in jlf_subquery.cpp:754
void addOrderByAndLimit(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo)
// make sure there is a LIMIT
// if (csep->orderByCols().size() > 0 && csep->limitNum() == (uint64_t) -1) // Change: commented out
This causes a regression in working_tpch1/windowFunctions/q0044.sql:
SELECT four, ten/4 as two,
sum(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row) x,
last_value(ten/4) over (partition by four order by ten/4 range between unbounded preceding and current row) y
FROM (select distinct ten, four from tenk1 order by 1,2) ss order by 1,2,3;
It appears that a limit(1) is inserted by this change into this query.