Skip to content
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

Column masks don't work when view declares columns with uppercase names #24054

Open
ksobolew opened this issue Nov 7, 2024 · 0 comments · May be fixed by #24055
Open

Column masks don't work when view declares columns with uppercase names #24054

ksobolew opened this issue Nov 7, 2024 · 0 comments · May be fixed by #24055

Comments

@ksobolew
Copy link
Contributor

ksobolew commented Nov 7, 2024

The view can be as simple as something like this:

CREATE VIEW test_view AS SELECT 123 AS "COLUMN";

When there is a column mask on "column", it should work, because in Trino column names are case-insensitive, but it does not.

(It's difficult to have a full reproducer in a ticket description, because there's no syntax to create column masks in SQL.)

ksobolew added a commit to ksobolew/trino that referenced this issue Nov 7, 2024
The table column reference was registered incorectly with the original
case taken from the view definition. It then failed to match the column
schema returned from `SystemAccessControl` and the mask was not applied.

Additionally, the registered table column references are also used to
check access to the columns; those were also using the original case
from the view definition and access control was not recognizing them.

Fixes trinodb#24054.
ksobolew added a commit to ksobolew/trino that referenced this issue Nov 7, 2024
The table column reference was registered incorectly with the original
case taken from the view definition. It then failed to match the column
schema returned from `SystemAccessControl` and the mask was not applied.

Additionally, the registered table column references are also used to
check access to the columns; those were also using the original case
from the view definition and access control was not recognizing them.

Fixes trinodb#24054.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant