Skip to content

Conversation

@hellozimi
Copy link

@hellozimi hellozimi commented Dec 1, 2025

The issue I experienced with the postgresql parser was that the following query did not resolve the column alias for the "createdAt" column which was casted - it resolved to null. The count(*) "value" did however resolve correctly to its alias.

select "createdAt"::date as "date",
  count(*) as "value"
  from object_event_log
  group by "createdAt"::date

The solution was to remove the alias:alias_clause? from the cast_double_colon rule, since the alias should be handled at the column_list_item level where the cast expression is used.

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 this pull request may close these issues.

1 participant