Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

Why make this change?

Addresses review feedback from #3051 requesting a more robust escaping mechanism to handle edge cases where column names already contain the escape sequence "DAB_ESCAPE$".

What is this change?

Double-Encoding Strategy

Enhanced the serialization escaping logic with two-step processing:

  1. Escape columns starting with DAB_ESCAPE$DAB_ESCAPE$DAB_ESCAPE$...
  2. Escape columns starting with $DAB_ESCAPE$...

Deserialization reverses this in opposite order to restore original names.

Prevent Double-Escaping

Added HashSet tracking in Write() method to handle cases where SourceDefinition and TableDefinition properties reference the same object instance.

Example Transformations

  • $FirstNameDAB_ESCAPE$FirstName (existing behavior, unchanged)
  • DAB_ESCAPE$FirstNameDAB_ESCAPE$DAB_ESCAPE$FirstName (new edge case)
  • RegularColumnRegularColumn (unchanged)

How was this tested?

  • Unit Tests

Added test cases covering:

  • Column names with escape sequence prefix
  • Mixed column name patterns in single table
  • Exact escape sequence as column name

Note: Existing serialization tests pass, confirming backward compatibility. New edge case tests demonstrate the double-encoding logic but require investigation - the in-place dictionary modifications are not reflecting in serialized JSON output despite working correctly in isolation.

Sample Request(s)

N/A - Internal serialization mechanism change with no API surface modifications.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…king

Co-authored-by: Alekhya-Polavarapu <67075378+Alekhya-Polavarapu@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on serialization escaping mechanism improvements Implement double-encoding escaping mechanism for column names with escape sequence prefix Jan 14, 2026
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.

2 participants