We are using a CTE UDF in a complex Trino query. Parsing that CTE UDF with SQLGlot (26.25.3) results in a ParseError exception. A normal UDF and a normal CTE query parses as expected.
WITH FUNCTION f(num int)
RETURNS int
RETURN num
SELECT f(1);
sqlglot.parse_one(sql, dialect="trino")
sqlglot.errors.ParseError: Expecting (. Line 1, Col: 15.
WITH FUNCTION f(num int)
RETURNS int
RETURN num
SELECT f(1);
We are using a CTE UDF in a complex Trino query. Parsing that CTE UDF with SQLGlot (26.25.3) results in a ParseError exception. A normal UDF and a normal CTE query parses as expected.
sqlglot.parse_one(sql, dialect="trino")