Skip to content

Commit 1077831

Browse files
Add transpilation support for DECRYPT, and test cases for DECRYPT (#7473)
* Add transpilation support for DECRYPT, and test cases for DECRYPT * Add transpilation support for TRY_DECRYPT function, and test cases for DECRYPT and TRY_DECRYPT
1 parent b3a32fb commit 1077831

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

sqlglot-integration-tests

sqlglot/generators/duckdb.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,11 @@ def encrypt_sql(self, expression: exp.Encrypt) -> str:
22632263
self.unsupported("ENCRYPT is not supported in DuckDB")
22642264
return self.function_fallback_sql(expression)
22652265

2266+
def decrypt_sql(self, expression: exp.Decrypt) -> str:
2267+
func_name = "TRY_DECRYPT" if expression.args.get("safe") else "DECRYPT"
2268+
self.unsupported(f"{func_name} is not supported in DuckDB")
2269+
return self.function_fallback_sql(expression)
2270+
22662271
def nthvalue_sql(self, expression: exp.NthValue) -> str:
22672272
from_first = expression.args.get("from_first", True)
22682273
if not from_first:

0 commit comments

Comments
 (0)