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

Support multi column results with using mongo query runner #6290

Closed
wants to merge 0 commits into from

Conversation

del-zhenwu
Copy link
Contributor

@justinclift
Copy link
Member

@del-zhenwu Thanks for getting this rebased and resubmitted.

It's currently failing the lint/formatting check. That should (in theory) be fairly easy to fix with the make format command, as long as things are setup according to the wiki:

https://github.com/getredash/redash/wiki/Local-development-setup#configuring-pre-commit

Hopefully that's useful? 😄

@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #6290 (5f1d137) into master (126fe93) will decrease coverage by 0.01%.
Report is 77 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 5f1d137 differs from pull request most recent head 3207ce5. Consider uploading reports for the commit 3207ce5 to get more accurate results

@@            Coverage Diff             @@
##           master    #6290      +/-   ##
==========================================
- Coverage   60.74%   60.73%   -0.01%     
==========================================
  Files         153      153              
  Lines       12513    12515       +2     
  Branches     1695     1694       -1     
==========================================
  Hits         7601     7601              
- Misses       4686     4687       +1     
- Partials      226      227       +1     
Files Coverage Δ
redash/query_runner/mongodb.py 40.38% <100.00%> (-0.40%) ⬇️

@justinclift
Copy link
Member

@del-zhenwu Cool, looks like it's passing most of the CI tests now, apart from the Code coverage check.

Are you ok to add some tests to this PR, to increase the coverage?

We don't have to, but if it's something that's easy to do then we probably should. 😄

@del-zhenwu
Copy link
Contributor Author

It seems no need to add ut, cause it just fixed the bug with no extra feature.

@justinclift
Copy link
Member

justinclift commented Sep 13, 2023

@guidopetri @wlach This PR looks like it's ready to merge, but doesn't seem to have been reviewed yet (nor in it's previous PR).

Would either of you be ok to review and merge this as appropriate? 😄

@justinclift
Copy link
Member

@del-zhenwu Is there no way we can add tests for this?

It seems like we're missing an opportunity to improve our code if we don't. 😉

Copy link
Contributor

@wlach wlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @del-zhenwu, as @justinclift suggested, could you please add a small test case to the tests which demonstrates your fix? It should not take long, there is prior art for you to work off of:

class TestMongoResults(TestCase):

redash/query_runner/mongodb.py Outdated Show resolved Hide resolved
@del-zhenwu
Copy link
Contributor Author

I updated the unit test case, to show it works in that case

Copy link
Contributor

@guidopetri guidopetri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks @del-zhenwu . I'm going to re-run the make format command so that it passes the lint test + merge master in.

@guidopetri
Copy link
Contributor

I seem to have done something wrong with git, and now I can't edit your master branch anymore to reopen this PR @del-zhenwu . I'm going to open a new one with the same contents

@justinclift
Copy link
Member

Oh. It sounds like the behaviour of git being trigger happy to close PRs has some really bad consequences when the PR branch is in an external repo. :(

Or GitHub needs to fix their code, so PRs closed by their automated stuff allow for restoring a branch so they can still be worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants