Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert function LEN from Redshift to Trino #1741

Closed
pangyifish opened this issue Jun 7, 2023 · 0 comments
Closed

Cannot convert function LEN from Redshift to Trino #1741

pangyifish opened this issue Jun 7, 2023 · 0 comments
Assignees

Comments

@pangyifish
Copy link

sql = """SELECT len('123')"""
converted_sql = sqlglot.transpile(sql, read="redshift", write="trino")[0]
print(converted_sql)
SELECT LEN('123')

Trino error: Function 'len' not registered

a fix could be replace len function with length

@tobymao tobymao self-assigned this Jun 7, 2023
@tobymao tobymao closed this as completed in 6168fbf Jun 7, 2023
adrianisk pushed a commit to adrianisk/sqlglot that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants