kgabryje commented on a change in pull request #17503:
URL: https://github.com/apache/superset/pull/17503#discussion_r755966546



##########
File path: 
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
##########
@@ -96,16 +96,17 @@ const getMetricsMatchingCurrentDataset = (
     return values;
   }
   return values.reduce((acc: ValueType[], metric) => {
-    if (
-      (typeof metric === 'string' || (metric as Metric).metric_name) &&
-      (areSavedMetricsEqual ||
+    if (typeof metric === 'string' || (metric as Metric).metric_name) {

Review comment:
       I'd love to do that, but it seems that we miss `isAdhocMetric` type 
guard. Also, our `isSavedMetric` checks if value is a string, so it won't cover 
the `(metric as Metric).metric_name` case. Maybe we can circle back to it once 
monorepo is merged and we can easily add new type guards?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to