-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(snowflake)!: Type annotation for Snowflake ENCRYPT and DECRYPT functions #6643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SQLGlot Integration Test ResultsComparing:
By Dialect
Overallmain: 2170 total, 1607 passed (pass rate: 74.1%), sqlglot version: sqlglot:feature/annotatetype-encryption: 2170 total, 1607 passed (pass rate: 74.1%), sqlglot version: Difference: No change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Left some comments.
Moreover, these functions exist only in snowflake ?
|
@VaggelisD For the other dialects, I checked both ENCRYPT and DECRYPT and did not find anything. The ones that support encryption seem to use the name AES_ENCRYPT or similar. |
geooo109
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
Added type annotation and tests for Snowflake's encryption functions, with TRY_ variants for decryption.
Documentation:
https://docs.snowflake.com/en/sql-reference/functions/encrypt
https://docs.snowflake.com/en/sql-reference/functions/encrypt_raw
https://docs.snowflake.com/en/sql-reference/functions/decrypt
https://docs.snowflake.com/en/sql-reference/functions/decrypt_raw
https://docs.snowflake.com/en/sql-reference/functions/try_decrypt
https://docs.snowflake.com/en/sql-reference/functions/try_decrypt_raw