prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.04k stars 5.37k forks source link

Add join_distribution_type in a magic comment? #17540

Open sharathin opened 2 years ago

sharathin commented 2 years ago

Hi Team,

Can you confirm if we can add join_distribution_type inside the query using magic comments as per https://docs.treasuredata.com/display/public/PD/Magic+Comments+for+Presto+Queries something like -- set session join_distribution_type = 'BROADCAST'

agrawalreetika commented 2 years ago

@sharathin Yes you can set Session property using join_distribution_type

Ref - https://prestodb.io/docs/current/admin/properties.html#join-distribution-type

sharathin commented 2 years ago

@agrawalreetika in magic comments ? i want to set this at the query level, not at the session properties level. Is that possible?

rongrong commented 2 years ago

How are you submitting queries to Presto? If you are using presto cli, just run set session before you run each query. If you use other client, set the session to the value you want for each query you submit to Presto.