Damans227 commented on a change in pull request #17603:
URL: https://github.com/apache/superset/pull/17603#discussion_r760237739
##########
File path:
superset-frontend/src/SqlLab/components/EstimateQueryCostButton/index.tsx
##########
@@ -26,24 +25,28 @@ import Loading from 'src/components/Loading';
import ModalTrigger from 'src/components/ModalTrigger';
import { EmptyWrapperType } from 'src/components/TableView/TableView';
-const propTypes = {
- dbId: PropTypes.number.isRequired,
- schema: PropTypes.string.isRequired,
- sql: PropTypes.string.isRequired,
- getEstimate: PropTypes.func.isRequired,
- queryCostEstimate: PropTypes.Object,
- selectedText: PropTypes.string,
- tooltip: PropTypes.string,
- disabled: PropTypes.bool,
-};
-const defaultProps = {
- queryCostEstimate: [],
- tooltip: '',
- disabled: false,
-};
+interface EstimateQueryCostButtonProps {
+ dbId: number;
+ schema: string;
+ sql: string;
+ getEstimate: Function;
+ queryCostEstimate: Record<string, any>;
Review comment:
Just for the sanity check, I narrowed down on this further and found
that the `SqlEditor` component makes use of the `EstimateQueryCostButton`
component with the `queryCostEstimate={qe.queryCostEstimate}` prop set.
Interestingly, the type for the `qe.queryCostEstimate` argument being passed
here is inferred to be `any`.
--
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]