-
Notifications
You must be signed in to change notification settings - Fork 1.1k
SQLGLOT oracle<->trino parsing error #7432
Copy link
Copy link
Closed as not planned
Description
The query returned by sqlglot is not running in oracle. Sqlglot unnecessarily parse the Dpipe to concat, which is not correctly parsed back to oracle.
issue 1: concat has 3 paramters
issue 2: varchar2 should be varchar2(n)
from sqlglot import parse_one
sql="""
SELECT "A:B" FROM (SELECT A || ":" || B as "A:B" from TABLE)
expr = parse_one(sql, dialect="oracle")
trino_sql = expr.sql(dialect="trino", pretty=True)
print(trino_sql)
expr = parse_one(trino_sql, dialect="trino")
oracle_sql = expr.sql(dialect="oracle", pretty=True)
print(oracle_sql)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels