feat: first step native support Trino#13105
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13105 +/- ##
==========================================
+ Coverage 53.06% 62.11% +9.05%
==========================================
Files 489 982 +493
Lines 17314 46314 +29000
Branches 4482 4505 +23
==========================================
+ Hits 9187 28769 +19582
- Misses 8127 17545 +9418
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
villebro
left a comment
There was a problem hiding this comment.
Thanks so much for this! The Presto spec has been in need of some TLC for a while now, so this is a perfect opportunity to make sure the Trino connector is well supported and has good test coverage!
|
@dungdm93 PyHive nows supports Trino. Do you think it would be better to use PyHIve, given that it's SQLAlchemy dialect is more mature, or do you think we should use the SQLAlchemy dialect you created, since it uses the official trino Python driver? |
|
Hi @betodealmeida, greet question. |
|
Yes, pyhive is definitely more mature now, but I'd still recommend the official Trino driver which we (the Trino community) maintain. |
|
Hi, i try to use trino with superset and i got this error :'trino error: 'Cursor' object has no attribute 'poll' it's a fresh install with docker-compose, i try to add sqlachemy-trino in 'requirements-local.txt' but logs says that this dependency is already here ( i can see it in the setup.py ). i don't understand that i'm missing to do. |
|
ok; it's working with v1.5.0 superset |
|
I'm still getting the 'Cursor' object has no attribute 'poll' error in the latest docker image |
|
use this method to install |
* feat: add TrinoEngineSpec Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * feat: add trino into extras_require Signed-off-by: Đặng Minh Dũng <dungdm93@live.com> * test: add trino_tests.py Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
SUMMARY
Previously, SuperSet was able to access Presto through the PyHive, even though it's not the official python driver, as well as it is not in active development. However, since Dec 27, 2020, PrestoSQL was renamed to Trino, this mean you can't using PyHive to access Trino any more.
So this MR is first step native support Trino using official python driver
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
Unit test already added
ADDITIONAL INFORMATION