-
Notifications
You must be signed in to change notification settings - Fork 14k
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
feat: Add Ocient support #22812
feat: Add Ocient support #22812
Conversation
* doc: add docstrings to functions * chore: clean up comments * perf: avoid copying row data that doesn't need to be sanitized
chore: code cleanup
Adding custom errors to Ocient engine spec
* Fix: Replace invalid inplace type conversion * Nit: Add comment clarifying why we cannot update in place * Nit: Generate functions based on cursor, not rows
* Adding support for query cancellation * Removing double import * Adding support for query cancellation Removing double import Inverting logic for fetch data. Re-add missing function * Fiding doubled up merge inputs * Handle Query cancellation for multiple queries * Adding mutex lock to query id mapping * Removing unecesssary iteration over values of cache * Fixing locks in db engine spec * Fix error capture in fetch_data
Thanks for putting this PR up @alexclavel-ocient ! A note for the rock star reviewers: expect 1 additional commit for the user doc 🙂 ! |
This looks great! Feel free to ping me when when doc is up (here or on Slack) and I'll review it! <3 |
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.
This looks really good, it's nice to see a DB engine spec so complete! 💪🏼
I left a question about using threading
and async query execution.
``` | ||
|
||
**NOTE**: You must enter the `user` and `password` credentials. `host` defaults to localhost, | ||
port defaults to 4050, database defaults to `system` and `tls` defaults |
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.
How is tls
passed to the URL?
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.
Great question! We should definitely provide an example here - will fix
# These are inserted into the cache when executing the query | ||
# They are then removed, either upon cancellation or query completion | ||
query_id_mapping: Dict[str, str] = dict() | ||
query_id_mapping_lock = threading.Lock() |
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.
Did you also test this with async queries? (with the query being executed by Celery)
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.
Hi @betodealmeida , I am the Ocient developer tasked with pushing this PR over the finish line, thanks for all of your help thus far!
Is there an integration test that stresses this async queries + ocient, or just a manual look-and-pray-for-racy-condition-if-exists? Pardon my ignorance, I found this doc, but couldn't find anything w.r.t. testing.
* Fix: make cte_alias compatible with Ocient * Fixing indentation in ocient.py
@betodealmeida Any Idea why the CI cannot find pyocient? We have sqlalchemy-ocient in setup.py, and pyocient is a requirement for sqlalchemy-ocient. |
The dependency in superset/requirements/testing.in Line 19 in 42db7e5
|
* v1.0.15 removes upper bound on protobuf version (conflict)
Is it possible for me to kick off a CI run using the Superset infra on my end? |
@jwilliams-ocient I started CI (after your first merged PR CI will start automatically) |
* docs: add example of setting DSN params * docs: apply review suggestions Co-authored-by: rmasters1 <100157128+rmasters1@users.noreply.github.com> --------- Co-authored-by: rmasters1 <100157128+rmasters1@users.noreply.github.com>
…alled on the target host (#22)
Hi @villebro , sorry to bug you again, but could you kick off another CI run for me? Crossing my fingers this is the final attempt 🤞🏾 |
Sure 👍 |
Ugh, once more, please? I'm an idiot and pushed a partial commit. In the event this run fails causing me to have to push another commit,, should I just create a separate PR with a single, empty commit in order to gain write access / stop bugging your team for trivial hit-the-run-button tasks? @villebro 🙏🏾 |
@jwilliams-ocient absolutely no problem! 🙂👍 |
@jwilliams-ocient on a slightly related note, I recently read James Dyson's book "Invention, a life", in which he mentions that it took him 5127 prototypes before his first vacuum cleaner worked. So we're still far off from that figure 😂 |
* refactor: holy shit I botched another commit lol * fix: address warnings generated by pylint * fix: fix custom errors matchers * test: fix broken unit tests
Codecov Report
@@ Coverage Diff @@
## master #22812 +/- ##
==========================================
+ Coverage 67.29% 68.07% +0.78%
==========================================
Files 1878 1924 +46
Lines 72137 74238 +2101
Branches 7866 8103 +237
==========================================
+ Hits 48541 50537 +1996
- Misses 21577 21624 +47
- Partials 2019 2077 +58
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 463 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* style: run pre-commit hooks * style: remove type annotations that may not exist * build: remove ocient from requirements/testing.in
Hi @rusackas , @betodealmeida , and @villebro. On behalf of Ocient, I just wanted to say thank you for helping us push this PR through, much appreciated! |
Thanks to @jwilliams-ocient and @alexclavel-ocient for contributing this! If you want to talk about next steps to spread the word, hit me up on Slack! |
Co-authored-by: jwilliams-ocient <60358443+jwilliams-ocient@users.noreply.github.com> Co-authored-by: Jordan Williams <jwilliams@ocient.com> Co-authored-by: rmasters1 <100157128+rmasters1@users.noreply.github.com>
WIP
SUMMARY
Adding support for Ocient databases
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION