bito-code-review[bot] commented on PR #37649:
URL: https://github.com/apache/superset/pull/37649#issuecomment-3845693754

   <!-- Bito Reply -->
   Yes, the same parsing issue exists in DrillByModal.tsx. Using parseInt 
directly on datasourceIdStr could incorrectly parse strings starting with 
numbers (e.g., '85abc' becomes 85), unlike the fix in DatasourceKey.ts which 
checks if the entire string is numeric.
   
   **superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx**
   ```
   const [datasourceIdStr, datasource_type] = formData.datasource.split('__');
     // Try to parse as integer, fall back to string (UUID) if NaN
     const parsedDatasourceId = parseInt(datasourceIdStr, 10);
     const datasource_id = Number.isNaN(parsedDatasourceId)
       ? datasourceIdStr
       : parsedDatasourceId;
   ```
   
   **superset-frontend/packages/superset-ui-core/src/query/DatasourceKey.ts**
   ```
   // Only parse as integer if the entire string is numeric
       // (parseInt would incorrectly parse "85d3139f..." as 85)
       const isNumeric = /^\d+$/.test(idStr);
       this.id = isNumeric ? parseInt(idStr, 10) : idStr;
   ```


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