Skip to content

Commit 65f2ec2

Browse files
author
Alison Gim
committed
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 functionality
1 parent 5e828bd commit 65f2ec2

3 files changed

Lines changed: 1293 additions & 122 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ lint.ignore = [
6767
"ARG002", # Unused method argument
6868

6969
"PLR0913", # Too many arguments in function definition
70+
"PLR2004", # Magic value used in comparison (common in tests)
7071
]
7172

7273
[tool.ruff.lint.pycodestyle]

0 commit comments

Comments
 (0)