Skip to content

Escape group-by and rollup keys when rendering expressions#1245

Merged
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:escape-group-by-keys
Jun 12, 2026
Merged

Escape group-by and rollup keys when rendering expressions#1245
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:escape-group-by-keys

Conversation

@brharrington

Copy link
Copy Markdown
Contributor

DataExpr.GroupBy/DropRollup/KeepRollup.toString joined grouping keys with a raw comma, so a key containing a special character (comma, colon, whitespace, or a standalone paren) did not round-trip: re-parsing the rendered expression would split or misinterpret the key. The parser unescapes keys on input, so the render side must re-escape them.

Escape each key via Parser.escape on render, matching Query.In/Query.Equal and the Atlas server (DataExpr.GroupBy.exprString). Factor the shared escape-and-join into DataExpr.escapeKeys.

DataExpr.GroupBy/DropRollup/KeepRollup.toString joined grouping keys with
a raw comma, so a key containing a special character (comma, colon,
whitespace, or a standalone paren) did not round-trip: re-parsing the
rendered expression would split or misinterpret the key. The parser
unescapes keys on input, so the render side must re-escape them.

Escape each key via Parser.escape on render, matching Query.In/Query.Equal
and the Atlas server (DataExpr.GroupBy.exprString). Factor the shared
escape-and-join into DataExpr.escapeKeys.
@brharrington brharrington added this to the 1.9.10 milestone Jun 12, 2026
@brharrington brharrington merged commit f1603c9 into Netflix:main Jun 12, 2026
1 check passed
@brharrington brharrington deleted the escape-group-by-keys branch June 12, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant