Unverified Commit 26ac55e2 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Feature-1709][core] Support use FlinkSQL CTE to preview data (#2482)

parent 523baf51
......@@ -39,6 +39,7 @@ public interface ResultBuilder {
String timeZone) {
switch (operationType) {
case SELECT:
case WITH:
return new SelectResultBuilder(id, maxRowNum, isChangeLog, isAutoCancel, timeZone);
case SHOW:
case DESC:
......
......@@ -126,6 +126,7 @@ public class Explainer {
statementList.add(statement);
} else if (operationType.equals(SqlType.INSERT)
|| operationType.equals(SqlType.SELECT)
|| operationType.equals(SqlType.WITH)
|| operationType.equals(SqlType.SHOW)
|| operationType.equals(SqlType.DESCRIBE)
|| operationType.equals(SqlType.DESC)
......
......@@ -63,6 +63,8 @@ public enum SqlType {
CTAS("CTAS", "^CREATE\\s.*AS\\sSELECT.*$"),
WITH("WITH", "^WITH.*"),
UNKNOWN("UNKNOWN", "^UNKNOWN.*");
private String type;
......
......@@ -147,7 +147,7 @@ const Result = (props: any) => {
id: current.id
});
const historyData = res.data;
if ('2' == historyData.status) {
if (historyData && '2' == historyData.status) {
const historyId = historyData.id;
const tableData = await handleGetOption('api/studio/getJobData', 'Get Data', {
jobId: historyId
......
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