Commit 65f2ec2
Alison Gim
Add full calculated measures support with quote/bracket/escaping fixes
- Add _ParseState class for consolidated quote/bracket/paren tracking
- Add _find_top_level_operator for finding operators outside quotes/brackets
- Add _find_matching_paren for balanced parenthesis matching
- Add _is_inside_quotes_or_brackets helper function
- Add _extract_aggregates_from_expression for complex measure extraction
- Add _contains_aggregate_function for optimized aggregate detection
- Add _wrap_column_refs_in_parens for arithmetic precedence
- Add _count_outer_parens for stripping outer parentheses
- Improve _escape_and_quote_columns with recursive operator handling
- Improve _convert_quoted_columns to convert standalone quotes
- Improve _is_number_literal to handle decimals and scientific notation
- Add KQL_AGG_PATTERN pre-compiled regex for performance
- Add PLR2004 to ignored ruff rules (magic numbers in tests)
- Add comprehensive unit tests for new functionality1 parent 5e828bd commit 65f2ec2
3 files changed
Lines changed: 1293 additions & 122 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
0 commit comments