jayeshchoudhary commented on code in PR #13296:
URL: https://github.com/apache/pinot/pull/13296#discussion_r1634466327
##########
pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts:
##########
@@ -436,7 +434,7 @@ const getAllTableDetails = (tablesList) => {
if (tablesList.length) {
const promiseArr = [];
tablesList.map((name) => {
- promiseArr.push(getTableSize(name));
+ promiseArr.push(getTableSize(name, false));
Review Comment:
don't have to pass false if we have default value
##########
pinot-controller/src/main/resources/app/requests/index.ts:
##########
@@ -89,8 +93,8 @@ export const putSchema = (name: string, params: string,
reload?: boolean): Promi
export const getSegmentMetadata = (tableName: string, segmentName: string):
Promise<AxiosResponse<SegmentMetadata>> =>
baseApi.get(`/segments/${tableName}/${segmentName}/metadata?columns=*`);
-export const getTableSize = (name: string): Promise<AxiosResponse<TableSize>>
=>
- baseApi.get(`/tables/${name}/size`);
+export const getTableSize = (name: string, detailed: boolean):
Promise<AxiosResponse<TableSize>> =>
+ baseApi.get(`/tables/${name}/size?detailed=${detailed}`);
Review Comment:
detailed can be optional param, default value would be false
this way you don't have to pass false to every function call, only function
that requires detailed data should pass true.
```suggestion
export const getTableSize = (name: string, detailed: boolean = false):
Promise<AxiosResponse<TableSize>> =>
baseApi.get(`/tables/${name}/size?detailed=${detailed}`);
```
--
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]