Closed xudong963 closed 1 month ago
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
The root cause of wrong order by result is the invalid binding sequence of order by and select
order by
select
bind_projection
RulePushDownSortEvalScalar
EliminateEvalScalar
PushDownSortScan
sort->eval scalar -> scan
This change isโ
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
The root cause of wrong order by result is the invalid binding sequence of
order by
andselect
select
, as known asbind_projection
first, then bind order by.RulePushDownSortEvalScalar
to push down sort under eval sort in lazy materialization sceneEliminateEvalScalar
, delete unnecessary eval scalarPushDownSortScan
to make sort push down scan if the SQL pattern issort->eval scalar -> scan
.Tests
Type of change
This change isโ