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
refactor: Add "is_select_query" method to base engine spec to unlock non-SQL dialects #15013
Conversation
…sible to override 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.
This is great, it's nice to have these abstractions to support more exotic dialects.
Codecov Report
@@ Coverage Diff @@
## master #15013 +/- ##
==========================================
- Coverage 77.62% 77.39% -0.24%
==========================================
Files 965 965
Lines 49521 49524 +3
Branches 6263 6263
==========================================
- Hits 38442 38328 -114
- Misses 10878 10995 +117
Partials 201 201
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks for working on this, @Ceridan! |
* upstream/master: fix(explore): Datepicker glitch on hover outside the modal (apache#15033) Add ming-height to empty tab (apache#14878) Remove nowrap (apache#14954) display all metric results in editor (apache#15031) feat: Add "is_select_query" method to base engine spec to make it possible to override it (apache#15013) fix(dashboard): custom css should be removed on unmount (apache#15025) feat(filter-box): hide druid options if druid not enabled (apache#14921) fix: adding additional configs and colors for queryHistory (apache#14995) chore: rename 'Source' to 'Database' for consistency (apache#15021) chore(ci): fix ci conflict (apache#15016) fix(native-filters): avoid double load on initialization (apache#15012) feat(native-filters): Support default to first value in select filter (apache#14869) docs: required information for OAuth2 configuration (apache#15010) Update index.mdx (apache#14990)
…sible to override it (apache#15013)
…sible to override it (apache#15013)
…sible to override it (apache#15013)
SUMMARY
We add
is_select_query
method to thesuperset/db_engine_specs/base.py
to allow override it in the inherited specs.Reason:
We are working on the SQLAlchemy Kusto dialect (Azure Data Explorer) and want to propose the support of this dialect in Superset. The current problem is that KQL (Kusto Query Language) doesn't use "SELECT" keyword for queries, it is started from the table name instead. If we want to allow SQLLabs limits UI component to working properly, we need to have the ability to define which query is essentially the SELECT-query in our db engine spec file.
More details in the issue: #15011
TESTING INSTRUCTIONS
The functionality is still the same. Actually, you may just run any query in the SQLLab and verify that the limit (UI component) is still applying.
ADDITIONAL INFORMATION