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
fix ORDER BY extraction when projections exist (#3052)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Restricts ORDER BY parsing to the table clause after ENGINE to avoid
capturing projection ORDER BY; adds tests for this case.
>
> - **ClickHouse parsing**:
> - Refines `extract_order_by_from_create_query` to search for `ORDER
BY` only after the `ENGINE` clause and ignore occurrences tied to
`PRIMARY KEY` or within projections.
> - **Tests**:
> - Adds a projection-heavy CREATE TABLE case to ensure only the main
table `ORDER BY` is extracted.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f6957fd. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments