Skip to content

Conversation

@jerqi
Copy link
Contributor

@jerqi jerqi commented Jul 6, 2021

backport #33204 to 3.1

What changes were proposed in this pull request?

PR #15764 disabled creating permanent views based on temporary views or UDFs. But AlterViewCommand didn't block temporary objects.

Why are the changes needed?

More robust view canonicalization.

Does this PR introduce any user-facing change?

Yes, now if you alter a permanent view based on temporary views or UDFs, the operation will fail.

How was this patch tested?

Add new unit tests.

@github-actions github-actions bot added the SQL label Jul 6, 2021
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@HyukjinKwon
Copy link
Member

This is a breaking change. why would we want to backport? I wouldn't.

@cloud-fan
Copy link
Contributor

This is a bug. A permanent view referring to temp objects is malformed. We shouldn't allow it to exist. We ban it in CREATE VIEW but forgot about ALTER VIEW.

@HyukjinKwon
Copy link
Member

But this can break a case that could look like working without a problem, and I wouldn't expect such cases in maintenence release. We banned such cases because of a potential unexpected behaviour, right.

@cloud-fan
Copy link
Contributor

The malformed permanent view is almost useless, as you can't access it in another Spark application (that's the major use case of a "permanent" view), or another Spark session. This PR is more like "fail earlier" to improve user experience.

Anyway, I don't have a strong opinion on it, as it's not a big deal. If there are objections, let's close and not merge.

@jerqi jerqi closed this Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants