Skip to content

Only parse FROM identifier in CTE if using Hive#2241

Open
Viicos wants to merge 1 commit intoapache:mainfrom
Viicos:vp/cte-hive
Open

Only parse FROM identifier in CTE if using Hive#2241
Viicos wants to merge 1 commit intoapache:mainfrom
Viicos:vp/cte-hive

Conversation

@Viicos
Copy link

@Viicos Viicos commented Feb 25, 2026

Fixes #2236.

}
};
if self.parse_keyword(Keyword::FROM) {
if dialect_of!(self is HiveDialect) && self.parse_keyword(Keyword::FROM) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I follow the intent of the PR, is it rather that hive should support supports_from_first_select (i.e. what's the difference in behavior from hive vs other dialects)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave more context in the issue I created; I'm not knowledgeable enough about Hive to understand if it should support FROM first selects, and it is unclear (see also #235 (comment)) why this FROM token parsing was introduced here. Maybe the intent was indeed to support FROM first selects, but I'd rather not break things here so that's why I only gated this FROM parsing for Hive.

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.

HiveQL, CTEs and FROM first SELECT statements

2 participants