-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make sure calculation views are created and returned correctly from the API. #14681
Conversation
…red are not required on the view.
if (helpers.views.isCalculationField(viewSchema[key])) { | ||
return viewSchema[key].visible !== false | ||
} | ||
return key in tableSchema && tableSchema[key].visible !== false |
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.
Is this not bypassing the view visibility?
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.
I broke some tests while working on this and the current state of the code passes the various visibility tests I broke. I haven't changed any visibility tests. In what way would this break view visibility?
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.
Interesting... Good we have tests for this. I were just worried that we do const visibleFields = new Set([...visibleSchemaFields, ...visibleTableFields])
, including the table fields. It might be trimmed in some post-process then
… into view-calculation-sql-4
if (helpers.views.isCalculationField(viewSchema[key])) { | ||
return viewSchema[key].visible !== false | ||
} | ||
return key in tableSchema && tableSchema[key].visible !== false |
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.
Interesting... Good we have tests for this. I were just worried that we do const visibleFields = new Set([...visibleSchemaFields, ...visibleTableFields])
, including the table fields. It might be trimmed in some post-process then
Description
Adds code and tests to make sure calculation views are treated correctly by the create and get view APIs. Prior to this, calculation fields were being stripped due to not being part of the table schema.