bito-code-review[bot] commented on code in PR #33140:
URL: https://github.com/apache/superset/pull/33140#discussion_r2922231253


##########
superset-frontend/src/explore/components/DatasourcePanel/fixtures.tsx:
##########
@@ -97,7 +97,165 @@ const metricsFiltered = {
   ],
 };
 
+export const columnsUnsorted = [
+  {
+    column_name: 'ccc',
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 100,
+    uuid: '100',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'VARCHAR',
+    type_generic: GenericDataType.String,
+    verbose_name: 'ccc',
+  },
+  {
+    column_name: 'aaa',
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 101,
+    uuid: '101',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'DOUBLE',
+    type_generic: GenericDataType.Numeric,
+    verbose_name: 'Www',
+  },
+  {
+    column_name: 'Cbb',
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 102,
+    uuid: '102',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'INT',
+    type_generic: GenericDataType.Numeric,
+    verbose_name: null,
+  },
+  {
+    column_name: 'BBB (has empty verbose_name)',
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 102,
+    uuid: '102',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'INT',
+    type_generic: GenericDataType.Numeric,
+    verbose_name: '',
+  },
+  {
+    column_name: 'yyy',
+    is_certified: 1,
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 103,
+    uuid: '103',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'INT',
+    type_generic: GenericDataType.Numeric,
+    verbose_name: 'yyy (certified)',
+  },
+  {
+    column_name: 'Cdd',
+    description: null,
+    expression: null,
+    filterable: true,
+    groupby: true,
+    id: 104,
+    uuid: '104',
+    is_dttm: false,
+    python_date_format: null,
+    type: 'INT',
+    type_generic: GenericDataType.Numeric,
+    verbose_name: null,
+  },
+];

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicate UUIDs in Test Fixtures</b></div>
   <div id="fix">
   
   The columnsUnsorted fixture has duplicate id and uuid values ('102') for the 
third and fourth column objects. Since uuid is used as a key in Map structures 
in the transformDatasourceFolders function, duplicates will cause one item to 
overwrite the other, leading to incorrect data handling in tests.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #5c2d98</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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