-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
when using duckdb-polyglot,
It automatically removes line breaks.
It cannot recognize differences in the same operator across different dialects. For example, / in PostgreSQL represents integer division, while / in DuckDB represents regular division.
D SELECT * FROM polyglot_query('SELECT 1/2', 'postgresql');
┌─────────┐
│ (1 / 2) │
│ double │
├─────────┤
│ 0.5 │
└─────────┘
It cannot distinguish between variables and literal constants. Literal constants like 1 and 2 are obviously not NULL, yet it performs unnecessary checks.
SELECT polyglot_transpile('SELECT decode(1,2,3,4)', 'oracle');
┌───────────────────────────────────────────────────────────────────────┐
│ polyglot_transpile('SELECT decode(1,2,3,4)', 'oracle') │
│ varchar │
├───────────────────────────────────────────────────────────────────────┤
│ SELECT CASE WHEN 1 = 2 OR (1 IS NULL AND 2 IS NULL) THEN 3 ELSE 4 END │
└───────────────────────────────────────────────────────────────────────┘
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels