Add transpilation support for DECRYPT_RAW and TRY_DECRYPT_RAW#7475
Open
fivetran-ashashankar wants to merge 1 commit intomainfrom
Open
Add transpilation support for DECRYPT_RAW and TRY_DECRYPT_RAW#7475fivetran-ashashankar wants to merge 1 commit intomainfrom
fivetran-ashashankar wants to merge 1 commit intomainfrom
Conversation
…ns, and test cases
ddf9890 to
dd2f0cf
Compare
Contributor
SQLGlot Integration Test ResultsComparing:
By Dialect
Overallmain: 107722 total, 106190 passed (pass rate: 98.6%), sqlglot version: sqlglot:RD-1069382-transpile-decrypt_raw: 98796 total, 98796 passed (pass rate: 100.0%), sqlglot version: Transitions: Dialect pair changes: 0 previous results not found, 2 curent results not found ✅ 18 test(s) passed |
fivetran-amrutabhimsenayachit
approved these changes
Apr 9, 2026
Collaborator
fivetran-amrutabhimsenayachit
left a comment
There was a problem hiding this comment.
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds transpilation support for Snowflake's DECRYPT_RAW and TRY_DECRYPT_RAW functions to DuckDB.
Changes
decryptraw_sqlmethod insqlglot/generators/duckdb.pythat handles both DECRYPT_RAW and TRY_DECRYPT_RAW using thesafeflagfunction_fallback_sqlto generate the SQL outputImplementation
The method checks the
safeflag on the expression to determine whether to output DECRYPT_RAW or TRY_DECRYPT_RAW, similar to the DECRYPT/TRY_DECRYPT implementation.Related: RD-1069382