Add Settings.renderImplicitWindowRange handling different default window RANGE clause defaults #11851
Closed
5 tasks done
Labels
Projects
Milestone
In Teradata, the default
RANGE
clause (or rather,ROWS
clause, becauseRANGE
isn't supported) is alwaysROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
, irrespective of the presence of anORDER BY
clause:The result being:
So,
ORDER BY
has no effect on aggregate window functions, if not accompanied by aROWS
clause. We might want to offer tooling to standardise this behaviour.OFF
Don't generate anything extra (default, current behaviour, opt out option for this improvement)RANGE_UNBOUNDED_PRECEDING
Emulate standard behaviourRANGE_ALL
Emulate Teradata behaviourROWS_UNBOUNDED_PRECEDING
Emulate standard behaviour (but useROWS
instead ofRANGE
)ROWS_ALL
Emulate Teradata behaviour (but useROWS
instead ofRANGE
)The five flags will allow for all desirable configurations:
The text was updated successfully, but these errors were encountered: