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
[MLv2] Drop redundant :fields clauses from stages and joins #36959
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
Passing run #1285 ↗︎
Details:
Review all test suite changes for PR #36959 ↗︎ |
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, I've minor comments only.
50c6850
to
7996e77
Compare
7996e77
to
5a9a0c4
Compare
export function findColumnIndexForColumnSetting(columns, columnSetting) { | ||
// NOTE: need to normalize field refs because they may be old style [fk->, 1, 2] | ||
const fieldRef = normalizeFieldRef(columnSetting.fieldRef); | ||
// first try to find by fieldRef | ||
if (fieldRef != null) { | ||
const index = _.findIndex(columns, col => | ||
_.isEqual(fieldRef, normalizeFieldRef(fieldRefForColumn(col))), | ||
areFieldRefsEqual(fieldRef, normalizeFieldRef(fieldRefForColumn(col))), |
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.
Dimension.parseMBQL(fieldRef).isSameBaseDimenson(normalizeFieldRef(fieldRefForColumn(col)))
should do the same thing
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.
Please use Dimension.parseMBQL(fieldRef).isSameBaseDimenson()
. Approving to not block the PR
If they're equivalent to the default, they can be removed (for stages) or replaced by `:all` (on joins).
5a9a0c4
to
fb6b3b4
Compare
If they're equivalent to the default, they can be removed (for stages)
or replaced by
:all
(on joins).