-
Notifications
You must be signed in to change notification settings - Fork 365
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
[trino][compute] Add compute support for Trino #3837
Conversation
e9e5195
to
b6432c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added few review comments. Also possible to add unit tests for this change?
desktop/core/src/desktop/management/commands/sync_warehouses.py
Outdated
Show resolved
Hide resolved
dialect = 'hive' if t.startswith('hive') else\ | ||
'impala' if t.startswith('impala') else\ | ||
'trino' if t.startswith('trino') else None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is formatting correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pycharm likes it this way and ruff also doesn't complain so I didn't bother much. On a closer look, the L148 is actually part of the if
started on L147, so an extra indent might be okay.
@@ -1909,7 +1909,7 @@ def _get_editor(self): | |||
'optimizer': get_optimizer_mode(), | |||
'page': '/editor/?type=%(type)s' % interpreter, | |||
'is_sql': interpreter['is_sql'], | |||
'is_batchable': interpreter['dialect'] in ['hive', 'impala'] or interpreter['interface'] in ['oozie', 'sqlalchemy'], | |||
'is_batchable': interpreter['dialect'] in ['hive', 'impala', 'trino'] or interpreter['interface'] in ['oozie', 'sqlalchemy'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required to enable batch queries for Trino?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If hive and impala are batch-able then why not trino? it seems to work fine on the frontend. Is there a reason not to do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even I was curious if Trino supports batch-querying in Hue OOTB. Good that the frontend is looking good.
@agl29 - Let's validate and test this out when implementing V2?
0182d23
to
1fdacf9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Few last comments..
Also UTs possible?
apps/beeswax/src/beeswax/conf.py
Outdated
default_ssl_cacerts, | ||
default_ssl_validate, | ||
) | ||
from desktop.lib.conf import Config, ConfigSection, coerce_bool, coerce_csv, coerce_password_from_script | ||
|
||
if sys.version_info[0] > 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Good to get rid of this py2 related conditional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel at some point in time, having an API endpoint (or few of them) in Hue for this could be beneficial.
Maybe then we don't need to depend on CDW layer running the command at a set interval and service discovery can be more dynamic and on-demand?
@@ -1909,7 +1909,7 @@ def _get_editor(self): | |||
'optimizer': get_optimizer_mode(), | |||
'page': '/editor/?type=%(type)s' % interpreter, | |||
'is_sql': interpreter['is_sql'], | |||
'is_batchable': interpreter['dialect'] in ['hive', 'impala'] or interpreter['interface'] in ['oozie', 'sqlalchemy'], | |||
'is_batchable': interpreter['dialect'] in ['hive', 'impala', 'trino'] or interpreter['interface'] in ['oozie', 'sqlalchemy'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even I was curious if Trino supports batch-querying in Hue OOTB. Good that the frontend is looking good.
@agl29 - Let's validate and test this out when implementing V2?
With this change, trino compute can be discovered, saved to db and used similar to hive and impala.
1fdacf9
to
a7e7017
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
With this change, trino compute can be discovered, saved to db and used similar to hive and impala.