bito-code-review[bot] commented on code in PR #40912:
URL: https://github.com/apache/superset/pull/40912#discussion_r3431645520
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -425,6 +427,16 @@ const StyledTableTabWrapper = styled.div`
}
`;
+// Functional wrapper for the lineage tab, since hooks can't be used directly
in
+// the DatasourceEditor class component.
+function DatasetLineageTab({ datasourceId }: { datasourceId?: number }) {
+ const lineageResource = useDatasetLineage(datasourceId ?? 0);
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Unnecessary API call with ID=0</b></div>
<div id="fix">
Passing `0` as fallback triggers an unnecessary API call to
`/api/v1/dataset/0/lineage`. The `isEmptyId` helper only skips requests for
`null`, `undefined`, or `''`, not `0`. Compare with `LineageModal` (line 41)
and `EditDataset` (line 72) which both pass `''` as fallback.
</div>
</div>
<small><i>Code Review Run #3bd027</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]