Unverified Commit f8eac436 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Fix-3396]fix cannot render query data button (#3401)

parent 447182dd
...@@ -230,7 +230,7 @@ const Result = (props: any) => { ...@@ -230,7 +230,7 @@ const Result = (props: any) => {
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
<div style={{ direction: 'rtl' }}> <div style={{ direction: 'rtl' }}>
{renderDownloadButton()} {renderDownloadButton()}
{current ? isSql(current.dialect) ? <></> : renderFlinkSQLContent() : undefined} {current && isSql(current?.dialect, true) && renderFlinkSQLContent()}
</div> </div>
{data.columns ? ( {data.columns ? (
<Table <Table
......
...@@ -53,7 +53,7 @@ export const isCanPushDolphin = (data: TaskDataType | undefined) => { ...@@ -53,7 +53,7 @@ export const isCanPushDolphin = (data: TaskDataType | undefined) => {
: false; : false;
}; };
export const isSql = (dialect: string) => { export const isSql = (dialect: string, includedFlinkSQL: boolean = false) => {
if (!dialect) { if (!dialect) {
return false; return false;
} }
...@@ -70,6 +70,8 @@ export const isSql = (dialect: string) => { ...@@ -70,6 +70,8 @@ export const isSql = (dialect: string) => {
case DIALECT.STARROCKS: case DIALECT.STARROCKS:
case DIALECT.PRESTO: case DIALECT.PRESTO:
return true; return true;
case DIALECT.FLINK_SQL:
return includedFlinkSQL;
default: default:
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment