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

convert query result back to text #6713

Conversation

AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Jan 17, 2024

What type of PR is this?

Convert QueryResult data column back to text due to a limit of JSON(10MB) and JSONB(255MB) column type size

  • Refactor
  • Feature
  • Bug Fix
  • New Query Runner (Data Source)
  • New Alert Destination
  • Other

Description

Removed from migrations conversion of QueryResult.data to JSONB, and added custom JsonText type, which is actually a copy of removed PseudoJson type

How is this tested?

  • Unit tests (pytest, jest)
  • E2E Tests (Cypress)
  • Manually
  • N/A

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (cd03da3) 0.00% compared to head (fe8da5d) 63.38%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6713       +/-   ##
===========================================
+ Coverage        0   63.38%   +63.38%     
===========================================
  Files           0      162      +162     
  Lines           0    13176    +13176     
  Branches        0     1819     +1819     
===========================================
+ Hits            0     8351     +8351     
- Misses          0     4534     +4534     
- Partials        0      291      +291     
Files Coverage Δ
redash/models/__init__.py 91.95% <100.00%> (ø)
redash/models/types.py 84.12% <63.63%> (ø)

... and 160 files with indirect coverage changes

@justinclift
Copy link
Member

Thanks for investigating this @AndrewChubatiuk. 😄

It looks like might need a bit more work before things are totally happy though: #6706 (comment)

Copy link
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

The previous type was TEXT, not JSON

redash/models/__init__.py Show resolved Hide resolved
@AndrewChubatiuk AndrewChubatiuk force-pushed the convert-query-result-data-to-text branch from 383c810 to fe8da5d Compare January 17, 2024 14:55
Copy link
Collaborator

@eradman eradman left a comment

Choose a reason for hiding this comment

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

I confirmed this change reverts query_results.data back to the text data type

Migration looks good; although the next preview docker build will be proof of that

@justinclift
Copy link
Member

Cool, lets merge this then. Thanks for getting this done @AndrewChubatiuk. 😄

@justinclift justinclift merged commit a54171f into getredash:master Jan 18, 2024
15 checks passed
@AndrewChubatiuk AndrewChubatiuk deleted the convert-query-result-data-to-text branch January 18, 2024 15:19
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.

3 participants