Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How to limit query with "like" operator #20341

Closed
cntwelve opened this issue Jan 11, 2024 · 2 comments
Closed

How to limit query with "like" operator #20341

cntwelve opened this issue Jan 11, 2024 · 2 comments

Comments

@cntwelve
Copy link

Hi, everyone:

In my productive env, there's a lot of qureies to some table with "like" operator, which make the cluster heavy load. Is there any method to limit such query? For example, use access control simlar to limit function call.

thanks a lot!


example:
query:
select column_a from table_b where column_c like 'data%';
Can I use ranger to limit queries whith "like" to table_b?

@hirolee88
Copy link
Contributor

hirolee88 commented Jan 15, 2024

io.trino.execution.QueryPreparer#prepareQuery where instanceof LikePredicate

Does Ranger need customization?

@cntwelve
Copy link
Author

cntwelve commented Feb 5, 2024

Sorry for a long time offline.

(1) Yes, the code you mentioned can do the job.
(2) I check issues again, and find this link:
#19912
operator's filter can be another way
(3) And I find trino-gateway that does the LB and Proxy function, can do the statement filter. But I cannt estimate the performance.

Thx.

@trinodb trinodb locked and limited conversation to collaborators Feb 5, 2024
@hashhar hashhar converted this issue into discussion #20575 Feb 5, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Development

No branches or pull requests

2 participants