Skip to content
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

[bugfix] TypeError: adhocMetric.comparator.join is not a function #5661

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Aug 17, 2018

Somehow we have a "IN" filter where the filter is a string, not an
array. While this may need to get fixed upstream as well, this prevents
the explore view from completely crashing.

Side note: this function looked somewhat brittle, I'm assuming it's used to keep
the free form SQL tab in sync and not used to generate the actual SQL
being executed.

@betodealmeida @GabeLoins @graceguo-supercat

Somehow we have a "IN" filter where the filter is a string, not an
array. While this may need to get fixed upstream as well, this prevents
the explore view from completely crashing.

Side note: this function looked somewhat brittle, I'm assuming it's used to keep
the free form SQL tab in sync and not used to generate the actual SQL
being executed.
@gabe-lyons
Copy link

@mistercrunch that's correct, it just keeps the tab in sync. I'm confused on how your in filter could be a string though.. in should only take an array?

@codecov-io
Copy link

Codecov Report

Merging #5661 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5661   +/-   ##
=======================================
  Coverage   63.49%   63.49%           
=======================================
  Files         360      360           
  Lines       22889    22889           
  Branches     2549     2549           
=======================================
  Hits        14534    14534           
  Misses       8340     8340           
  Partials       15       15
Impacted Files Coverage Δ
superset/assets/src/explore/AdhocFilter.js 87.5% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a4b70d...a7ef8ce. Read the comment docs.

@mistercrunch
Copy link
Member Author

Yes clearly there's more to it, but between the different db migrations and re-interpretations of filters in different areas of the code, it's hard to understand where that bad state might have appeared and whether it's likely to happen again. Merging as a "defensive programming" approach.

Side note is that we should avoid having many kinds or "generations" of filters and metrics. Hopefully we can convert the old to new ones early in the pipeline, and assume new generation metrics and filters everywhere else in the code.

@mistercrunch mistercrunch merged commit 0a1aa6d into apache:master Aug 17, 2018
@mistercrunch mistercrunch deleted the fix_comparator branch August 17, 2018 22:53
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
…ache#5661)

Somehow we have a "IN" filter where the filter is a string, not an
array. While this may need to get fixed upstream as well, this prevents
the explore view from completely crashing.

Side note: this function looked somewhat brittle, I'm assuming it's used to keep
the free form SQL tab in sync and not used to generate the actual SQL
being executed.
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants