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

Unsupported expression type ArrayContained #3511

Closed
Toms1999 opened this issue May 20, 2024 · 0 comments · Fixed by #3515
Closed

Unsupported expression type ArrayContained #3511

Toms1999 opened this issue May 20, 2024 · 0 comments · Fixed by #3515
Assignees

Comments

@Toms1999
Copy link
Contributor

Toms1999 commented May 20, 2024

Before you file an issue

  • Make sure you specify the "read" dialect eg. parse_one(sql, read="postgres")
  • Make sure you specify the "write" dialect eg. ast.sql(dialect="mysql")
  • Check if the issue still exists on main:Couldn't find anything related

Fully reproducible code snippet

import sqlglot

sql = """select string_to_array('dd,ee', ',') <@array['dd','ee','ff','gg','hh'];"""

result1 = sqlglot.transpile(sql, read='postgres', write='mysql')[0]

print(result1)

The generator function throws an error:
ValueError: Unsupported expression type ArrayContained

Official Documentation
Please include links to official SQL documentation related to your issue.

(postgres array/string_to_array)

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

Successfully merging a pull request may close this issue.

2 participants