Skip to content

PostgreSQL-style typecast error for is not null expression #6055

@vchan

Description

@vchan

Fully reproducible code snippet
The following SQL query using PostgreSQL-style typecast is legal in Postgres and Redshift

select col is not null::boolean from table

Sqlglot error:

>>> parse_one("select col is not null::bool from table", read="postgres")
sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 1, Col: 24.
  select col is not null::bool from table

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions