Emits a distinct as <input>->distinct(), over every column: never the
column form distinct(~[…]), which also projects. Where the engine's plan
would merge the distinct with a limit after it, it is padded so the
distinct stays in its own query:
->distinct()->extend(~cube_d: x | 1)->select(~[<input columns>]) (PLAN
§11.4). SQL Server gets select top N distinct, which T-SQL rejects;
Sybase IQ numbers a limit's rows inside the select distinct, which then
removes nothing.
Emits a distinct as
<input>->distinct(), over every column: never the column formdistinct(~[…]), which also projects. Where the engine's plan would merge the distinct with a limit after it, it is padded so the distinct stays in its own query:->distinct()->extend(~cube_d: x | 1)->select(~[<input columns>])(PLAN §11.4). SQL Server getsselect top N distinct, which T-SQL rejects; Sybase IQ numbers a limit's rows inside theselect distinct, which then removes nothing.