You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note the above query is a normal common table expression (not recursive), I tried to run it with the following configuration and it failed as expected:
- query: with c1 as (select col1, col2 from t1) select col1, col2 from c1
- maxRows: 1- unorderedResult: [{COL1: 10, COL2: 1},
{COL1: 10, COL2: 2},
{COL1: 20, COL2: 6},
{COL1: 20, COL2: 7}]
On the other hand, continuations are indeed not handled correctly in case of recursive CTE, the reason is that any user-defined row limit and skip set in the execution properties are ignored in the underlying recursive union cursor logic. I made a this PR #3111 to fix exactly that, and with it, continuations now work as expected for recursive CTEs. Example:
- query: with recursive c1 as (
select id, parent from t1 where parent =-1union allselectb.id, b.parentfrom c1 as a, t1 as b wherea.id=b.parent) select id from c1
- maxRows: 1- result: [{ID: 1}]
- result: [{ID: 10}]
- result: [{ID: 20}]
- result: [{ID: 40}]
- result: [{ID: 50}]
- result: [{ID: 70}]
- result: [{ID: 100}]
- result: [{ID: 210}]
- result: [{ID: 250}]
- result: []
Summary:
Specifying maxRows:1 for recursive query has no effect
Steps To Reproduce:
{COL1: 10, COL2: 2},
{COL1: 20, COL2: 6},
{COL1: 20, COL2: 7}]
Note: The same happens for UPDATE queries.
The text was updated successfully, but these errors were encountered: