Commit a6351ca
committed
fix: gracefully skip SortExec when sort columns are not in the output schema
When a query like `SELECT name FROM t ORDER BY id` is federated, the
sort column (`id`) is not in the plan's output schema (`[name]`).
`create_physical_sort_expr` fails because it cannot resolve `id`
against the output schema.
Previously this returned an error, breaking such queries. Now we
gracefully skip adding the local SortExec and rely on the remote
database to handle the sorting via the generated SQL.1 parent bda2122 commit a6351ca
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
204 | 205 | | |
205 | 206 | | |
206 | 207 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
0 commit comments