-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add redirection awareness to the table tasks #10577
Add redirection awareness to the table tasks #10577
Conversation
IMO for every operation, we'd want to either (1) use redirected table handle OR (2) fail if a table is getting redirected. this would be safer than silently trying to get source table handle, especially for future usages. @findepi @losipiuk @electrum If we've consensus on that, we can start with callsites where we know we want to definitely redirect. Then, separately, add a change that disallows redirection for "vanilla" Metadata#getTableHandle (or introduce a Metadata#getOriginalTableHandle).
let's discuss on above operations and see if disallowing/redirecting decisions are reasonable. We can track it in a separate issue and take them in smaller PRs. |
I think we should allow such a behaviour. It adds more simplicity for the user experience and (at the moment) I see no added complexity in allowing such an operation. |
I feel this is a bit convoluted because of the api design. For a generic operation like |
I agree with @findinpath that table rename base should be allowed
The source and target tables are same thing, viewed from different angles, so there is one name only. cc @losipiuk |
Thanks @phd3 for putting together this table. Awesome job. It really helps to see all the operations listed cohesively in single place.
CREATE TABLE doesn't need to be redirect-aware. There are two options
discussed above
Other authorization-related operations are disallowed in case of redirections.
It must be allowed. The APIs can indeed be confusing, but are orthogonal, happen on different layers.
Must follow redirects, as any other read. |
I see your point, w.r.t. the current usecase of hive/iceberg/delta. However, as we know this API lets a connector return any table, not just catalog. (possibly a different table in the same catalog.)
imo the point around |
agreed with your suggestions on other operations. I'm curious about this usecase. can you please elaborate or give an example?
|
my imaginary use-case
not disallowing renames is not incorrect in broader case, in potential future use-cases, and are diserable in use-cases we have today i agree that if a redirect source_table so some_oddly_named table a rename can be confusing, |
If that's the case, then we should change the APIs to only support that use case (same schema/table name but different catalog/connector implementation). In hindsight, that's probably what we should have done in the first place. |
I am reviving this thread which seems to be dormant for a while. So far I see that we don't have an agreement on RENAME TABLE functionality. I will create a smaller PR containing the changes from this PR for:
to get this effort going forward. |
Related PR from @phd3 : #8340