Commit 35c6d37
fix(duckdb): wrap OCTET_LENGTH string arguments with ENCODE (#7507)
* fix(duckdb): wrap OCTET_LENGTH string arguments with ENCODE [CLAUDE]
- DuckDB OCTET_LENGTH only accepts BLOB or BIT types, not VARCHAR
- Snowflake OCTET_LENGTH accepts both VARCHAR and BINARY
- Added bytelength_sql() method to wrap VARCHAR arguments with ENCODE()
- Uses _is_binary() check to detect BINARY types via type annotation
- Binary data (BINARY, VARBINARY, BLOB) is passed through without ENCODE
- Fixes transpilation from Snowflake to DuckDB for string arguments
* chore: update integration tests submodule pointer
* feat(snowflake)!: Transpilation support for REDUCE - implemented review comments
* Sync w/ integration tests
---------
Co-authored-by: George Sittas <giwrgos.sittas@gmail.com>1 parent d0407ed commit 35c6d37
2 files changed
Lines changed: 11 additions & 2 deletions
Submodule sqlglot-integration-tests updated from 45b8e56 to e112964
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1536 | 1536 | | |
1537 | 1537 | | |
1538 | 1538 | | |
1539 | | - | |
1540 | 1539 | | |
1541 | 1540 | | |
1542 | 1541 | | |
| |||
3522 | 3521 | | |
3523 | 3522 | | |
3524 | 3523 | | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
3525 | 3534 | | |
3526 | 3535 | | |
3527 | 3536 | | |
| |||
0 commit comments