-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
fix(datasource): saving new calculated columns #23783
fix(datasource): saving new calculated columns #23783
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23783 +/- ##
==========================================
+ Coverage 67.87% 67.95% +0.07%
==========================================
Files 1925 1933 +8
Lines 74389 74752 +363
Branches 8108 8108
==========================================
+ Hits 50494 50799 +305
- Misses 21818 21876 +58
Partials 2077 2077
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hello! |
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.
LGTM - thanks for catching this!
@@ -139,7 +139,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({ | |||
), | |||
columns: currentDatasource?.columns?.map( | |||
(column: Record<string, unknown>) => ({ | |||
id: column.id, | |||
id: typeof column.id !== 'string' ? column.id : undefined, |
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.
Since we only accept Number or undefined, maybe it'd be more clear to compare to 'number'
? Like typeof column.id === 'number' ? column.id : undefined
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.
Fixed
…ues (apache#23779)" This reverts commit 4b3e507.
(cherry picked from commit 742c2cd)
This reverts commit 742c2cd.
This reverts commit 742c2cd.
SUMMARY
Creating a new calculated columns isn't working.
Because the datasource is receiving a string ID from the frontend, which is resulting in invalid input.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before
2023-04-22_19-18-21.mp4
After
2023-04-22_19-15-44.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
CC @jfrag1 #23678