mirror of https://github.com/apache/druid.git
don't show transform actions on * queries (#13005)
This commit is contained in:
parent
48ceab2153
commit
054688528f
|
@ -152,22 +152,23 @@ export const QueryOutput = React.memo(function QueryOutput(props: QueryOutputPro
|
|||
}
|
||||
|
||||
if (!parsedQuery.hasStarInSelect()) {
|
||||
basicActions.push({
|
||||
basicActions.push(
|
||||
{
|
||||
icon: IconNames.EDIT,
|
||||
title: `Rename column`,
|
||||
title: 'Rename column',
|
||||
onAction: () => {
|
||||
setRenamingColumn(headerIndex);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
basicActions.push({
|
||||
},
|
||||
{
|
||||
icon: IconNames.CROSS,
|
||||
title: `Remove column`,
|
||||
title: 'Remove column',
|
||||
onAction: () => {
|
||||
onQueryAction(q => q.removeOutputColumn(header));
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return basicActionsToMenu(basicActions)!;
|
||||
} else {
|
||||
|
|
|
@ -244,7 +244,7 @@ export const ResultTablePane = React.memo(function ResultTablePane(props: Result
|
|||
}
|
||||
|
||||
// JSON hint
|
||||
if (column.nativeType === 'COMPLEX<json>') {
|
||||
if (selectExpression && column.nativeType === 'COMPLEX<json>') {
|
||||
const paths = getJsonPaths(
|
||||
filterMap(queryResult.rows, row => {
|
||||
const v = row[headerIndex];
|
||||
|
@ -319,7 +319,7 @@ export const ResultTablePane = React.memo(function ResultTablePane(props: Result
|
|||
}
|
||||
}
|
||||
|
||||
if (!parsedQuery.hasStarInSelect()) {
|
||||
if (noStar) {
|
||||
menuItems.push(
|
||||
<MenuItem
|
||||
key="edit_column"
|
||||
|
@ -487,6 +487,7 @@ export const ResultTablePane = React.memo(function ResultTablePane(props: Result
|
|||
}
|
||||
}
|
||||
|
||||
if (noStar) {
|
||||
menuItems.push(
|
||||
<MenuItem
|
||||
key="remove_column"
|
||||
|
@ -497,6 +498,7 @@ export const ResultTablePane = React.memo(function ResultTablePane(props: Result
|
|||
}}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
menuItems.push(
|
||||
<MenuItem
|
||||
|
|
Loading…
Reference in New Issue