Skip to content

Commit fdd3851

Browse files
author
Alison Gim
committed
Clean up comments in _escape_and_quote_columns
1 parent 062cf90 commit fdd3851

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sqlalchemy_kusto/dialect_kql.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,10 @@ def _escape_and_quote_columns(name: str | None, is_alias=False) -> str:
362362
or KustoKqlCompiler._is_number_literal(name)
363363
) and not is_alias:
364364
return name
365-
# Check if already wrapped in ["ColumnName"] (escaped format)
365+
# First, check if the name is already wrapped in ["ColumnName"] (escaped format)
366366
if name.startswith('["') and name.endswith('"]'):
367367
return name # Return as is if already properly escaped
368368
# Handle arithmetic expressions by recursively escaping both sides
369-
# Check for operators BEFORE stripping quotes to handle "Measure 1" + "Measure 2"
370369
if not is_alias:
371370
for operator in ["/", "+", "-", "*"]:
372371
# Find operator that's not inside quotes

0 commit comments

Comments
 (0)