Copilot commented on code in PR #35933:
URL: https://github.com/apache/superset/pull/35933#discussion_r2491961413


##########
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Scatter/buildQuery.ts:
##########
@@ -75,17 +77,23 @@ export default function buildQuery(formData: 
DeckScatterFormData) {
         typeof col === 'string' ? col : col.label || col.sqlExpression || '',
       );
       const withJsColumns = addJsColumnsToColumns(columnStrings, js_columns);
+      const uniqueColumns = ensureColumnsUnique(withJsColumns);
 
-      columns = withJsColumns as QueryFormColumn[];
+      columns = uniqueColumns as QueryFormColumn[];
       columns = addTooltipColumnsToQuery(columns, tooltip_contents);
 
-      const metrics = processMetricsArray([point_radius_fixed?.value]);
+      const isRadiusMetric =
+        point_radius_fixed?.type === 'metric' && point_radius_fixed?.value;

Review Comment:
   The condition `point_radius_fixed?.value` will be falsy when value is 0, 
which is a valid numeric metric ID. This should explicitly check for 
`point_radius_fixed?.value !== undefined` to properly handle the value 0.
   ```suggestion
           point_radius_fixed?.type === 'metric' && point_radius_fixed?.value 
!== undefined;
   ```



-- 
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