superset
superset copied to clipboard
fix: Allow clickhouse dbs with timestamps to visualize queries
SUMMARY
Clickhouse queries would fail with timestamps since we duck typing the columns types. This PR fixes this issue, but currently looking into a more robust solution for standardizing columns in side this ExploreMixin
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
Codecov Report
Merging #21446 (75dc403) into master (18ec294) will decrease coverage by
0.00%
. The diff coverage is0.00%
.
:exclamation: Current head 75dc403 differs from pull request most recent head 19a0688. Consider uploading reports for the commit 19a0688 to get more accurate results
@@ Coverage Diff @@
## master #21446 +/- ##
==========================================
- Coverage 66.71% 66.70% -0.01%
==========================================
Files 1796 1796
Lines 68716 68720 +4
Branches 7313 7313
==========================================
Hits 45843 45843
- Misses 21011 21015 +4
Partials 1862 1862
Flag | Coverage Δ | |
---|---|---|
hive | 52.90% <0.00%> (-0.01%) |
:arrow_down: |
mysql | 78.20% <0.00%> (-0.01%) |
:arrow_down: |
postgres | 78.27% <0.00%> (-0.01%) |
:arrow_down: |
presto | 52.80% <0.00%> (-0.01%) |
:arrow_down: |
python | 81.39% <0.00%> (-0.01%) |
:arrow_down: |
sqlite | 76.76% <0.00%> (-0.01%) |
:arrow_down: |
unit | 50.91% <0.00%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
superset/models/helpers.py | 39.04% <0.00%> (-0.18%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@hughhhh Could you post both SQL that changes before and after? Thanks!
/testenv up
@jinghua-qa Ephemeral environment spinning up at http://34.220.56.32:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
Tested in preset workspace, able to see date column in chart-power query in explore. LGTM
Is the problem that the Clickhouse driver is returning columns that are dictionaries instead of ColumnTable
objects? If so you can override the get_columns
method of the Clickhouse DB engine spec to return and object instead of a dict.
@betodealmeida the implementation for columns in the Query
model returns dict I'm working on another PR to standardize this for all Query.columns
object in another PR that i'm currently working on. This is a patch to unblock people using clickhouse and want to explore using Query
/testenv up
@yousoph Ephemeral environment creation failed. Please check the Actions logs for details.
/testenv up
@yousoph Ephemeral environment spinning up at http://35.90.3.173:8080. Credentials are admin
/admin
. Please allow several minutes for bootstrapping and startup.
Ephemeral environment shutdown and build artifacts deleted.
🏷️ preset:2022.39