Fix merge conflicts

- Update regression tests to meet the changes in the regression
   test output.
 - Replace Ifs with Asserts given that the check is already done
pull/1347/head
Onder Kalaci 2017-04-24 16:07:15 +03:00
parent e1c812fbc2
commit 88de828b4b
2 changed files with 5 additions and 14 deletions

View File

@ -3218,18 +3218,9 @@ WorkerLimitCount(MultiExtendedOp *originalOpNode)
* certain expressions such as parameters are not evaluated and converted
* into Consts on the op node.
*/
if (!IsA(originalOpNode->limitCount, Const))
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("unsupported limit clause")));
}
/* same as the above but this time for OFFSET clause */
if (originalOpNode->limitOffset && !IsA(originalOpNode->limitOffset, Const))
{
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("unsupported offset clause")));
}
Assert(IsA(originalOpNode->limitCount, Const));
Assert(originalOpNode->limitOffset == NULL ||
IsA(originalOpNode->limitOffset, Const));
/*
* If we don't have group by clauses, or if we have order by clauses without

View File

@ -1930,7 +1930,7 @@ FROM (
ORDER BY 2 DESC, 1
LIMIT $1 OFFSET $2;
EXECUTE parametrized_limit(3,3);
ERROR: unsupported limit clause
ERROR: no value found for parameter 1
PREPARE parametrized_offset AS
SELECT user_id, array_length(events_table, 1)
FROM (
@ -1947,7 +1947,7 @@ FROM (
ORDER BY 2 DESC, 1
LIMIT 3 OFFSET $1;
EXECUTE parametrized_offset(3);
ERROR: unsupported offset clause
ERROR: no value found for parameter 1
SET client_min_messages TO DEFAULT;
DROP FUNCTION volatile_func_test();
SET citus.subquery_pushdown to OFF;