-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[select-star] Adding optional schema to view #6051
[select-star] Adding optional schema to view #6051
Conversation
d4a7915
to
99c7819
Compare
Codecov Report
@@ Coverage Diff @@
## master #6051 +/- ##
=========================================
+ Coverage 77.74% 77.84% +0.1%
=========================================
Files 46 46
Lines 9400 9412 +12
=========================================
+ Hits 7308 7327 +19
+ Misses 2092 2085 -7
Continue to review full report at Codecov.
|
@@ -1 +0,0 @@ | |||
{{ content |safe }} |
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.
Oh god that was awful, thanks for getting rid of this.
superset/db_engine_specs.py
Outdated
# table is not partitioned | ||
return False | ||
for c in columns: | ||
if c['name'] == col_name: |
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: c.get()
is generally safer as it won't ever raise KeyError
, though in this case the schema should be safe
LGTM |
99c7819
to
fc924e3
Compare
(cherry picked from commit 1ee08fc)
This PR updates a couple of aspects of the select-star logic including:
/select_star
route./select_star
route return a JSON response as opposed to HTML./select_star
route includes a partition (if appropriate)./table
route includes a partition (if appropriate)†.where_latest_partition
for Presto.where_latest_partition
behavior to return the first partition if the table is multi-partitioned. Previous it would returnFalse
is the table was partitioned but contained more than one partition key.† Note this improves the performance of the SQL Lab preview by including a partition predicate even though there is additional overhead of finding the latest partition. At Airbnb for a large daily partitioned table with several years of data this reduced the query time from ~ 75 seconds to ~ 3 seconds. This also helps to ensure that the data preview is associated with the partition (guaranteed for the single partitioned case) shown in the UI.
to: @graceguo-supercat @kristw @michellethomas @mistercrunch @timifasubaa @williaster