Commit fc6e7cb
authored
perf(parser): short-circuit _parse_pivots when next token isn't PIVOT/UNPIVOT (#7557)
_parse_pivots runs once per Join and most table refs, but always
builds an iter+list even when the next token can never start a PIVOT
clause. Guard on the token type up front so the common no-pivot path
is a single check.
Small but consistent win under mypyc (~1-3% on join-heavy queries
like many_joins). No behavior change.1 parent ee69e0a commit fc6e7cb
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5010 | 5010 | | |
5011 | 5011 | | |
5012 | 5012 | | |
| 5013 | + | |
| 5014 | + | |
5013 | 5015 | | |
5014 | 5016 | | |
5015 | 5017 | | |
| |||
0 commit comments