Skip to content

Conversation

@EmmyMiao87
Copy link
Contributor

Proposed changes

Issue Number: close #7823

Problem Summary:

If the tableRef behind represents a CTE or a view,
the tableRef will be reset during semantic parsing.
The new tableRef needs to inherit the lateral view property of the origin tableRef
to ensure that the lateral view is not accidentally lost during parsing.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

…view on the view

If the tableRef behind represents a CTE or a view,
the tableRef will be reset during semantic parsing.
The new tableRef needs to inherit the lateral view property of the origin tableRef
to ensure that the lateral view is not accidentally lost during parsing.
@EmmyMiao87 EmmyMiao87 self-assigned this Feb 8, 2022
@EmmyMiao87 EmmyMiao87 added area/lateral-view kind/fix Categorizes issue or PR as related to a bug. area/planner Issues or PRs related to the query planner labels Feb 8, 2022
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2022

PR approved by anyone and no changes requested.

@morningman morningman merged commit eeaf672 into apache:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/lateral-view area/planner Issues or PRs related to the query planner kind/fix Categorizes issue or PR as related to a bug. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] lateral view + subquery leads to the error predicate

2 participants