Skip to content

Improve Double Escape Implementation#371

Merged
eakmanrq merged 5 commits intomainfrom
eakmanrq/move_double_escape_gen
Feb 16, 2023
Merged

Improve Double Escape Implementation#371
eakmanrq merged 5 commits intomainfrom
eakmanrq/move_double_escape_gen

Conversation

@eakmanrq
Copy link
Contributor

The old implementation had us creating an engine adapter specific to_json method for serializing Pydantic models to json. This had an issue with Airflow because it writes to Postgres. I decided that having this logic at the model serialization layer was to not the right place and easy to get wrong. I wanted to push it closer to sqlglot itself so I added it to where we override sqlglot behavior.

@eakmanrq eakmanrq requested a review from tobymao February 15, 2023 17:20
@eakmanrq eakmanrq force-pushed the eakmanrq/move_double_escape_gen branch from 72ec394 to 756e281 Compare February 15, 2023 17:21
@tobymao
Copy link
Contributor

tobymao commented Feb 15, 2023

i don't know if this is right, let's chat about it

@eakmanrq eakmanrq force-pushed the eakmanrq/move_double_escape_gen branch from 756e281 to 4a5b413 Compare February 16, 2023 02:40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exp.Literal.string(double_escape(e.name))

@eakmanrq eakmanrq force-pushed the eakmanrq/move_double_escape_gen branch from 3c27b86 to 35e8eea Compare February 16, 2023 05:54
@eakmanrq eakmanrq merged commit 38ef4f6 into main Feb 16, 2023
@eakmanrq eakmanrq deleted the eakmanrq/move_double_escape_gen branch February 16, 2023 06:30
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