Unverified Commit 9c584237 authored by Licho's avatar Licho Committed by GitHub

fix: set oprerator problem (#2722)

* fix: set oprerator problem Signed-off-by: 's avatarlicho <lecho.sun@gmail.com> * Spotless Apply * chore: override Signed-off-by: 's avatarlicho <lecho.sun@gmail.com> --------- Signed-off-by: 's avatarlicho <lecho.sun@gmail.com> Co-authored-by: 's avatarleechor <leechor@users.noreply.github.com>
parent d0e81848
...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts; ...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts;
import org.dinky.data.model.LineageRel; import org.dinky.data.model.LineageRel;
import org.dinky.data.result.SqlExplainResult; import org.dinky.data.result.SqlExplainResult;
import org.dinky.parser.CustomParserImpl; import org.dinky.parser.CustomParserImpl;
import org.dinky.trans.ddl.CustomSetOperation;
import org.dinky.utils.JsonUtils; import org.dinky.utils.JsonUtils;
import org.dinky.utils.LineageContext; import org.dinky.utils.LineageContext;
...@@ -354,6 +355,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment { ...@@ -354,6 +355,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment {
} else if (operation instanceof ResetOperation) { } else if (operation instanceof ResetOperation) {
callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap); callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap);
return true; return true;
} else if (operation instanceof CustomSetOperation) {
CustomSetOperation customSetOperation = (CustomSetOperation) operation;
if (customSetOperation.isValid()) {
callSet(
new SetOperation(customSetOperation.getKey(), customSetOperation.getValue()),
getStreamExecutionEnvironment(),
setMap);
}
return true;
} }
} }
return false; return false;
......
...@@ -25,6 +25,7 @@ import org.dinky.assertion.Asserts; ...@@ -25,6 +25,7 @@ import org.dinky.assertion.Asserts;
import org.dinky.data.model.LineageRel; import org.dinky.data.model.LineageRel;
import org.dinky.data.result.SqlExplainResult; import org.dinky.data.result.SqlExplainResult;
import org.dinky.parser.CustomParserImpl; import org.dinky.parser.CustomParserImpl;
import org.dinky.trans.ddl.CustomSetOperation;
import org.dinky.utils.LineageContext; import org.dinky.utils.LineageContext;
import org.apache.flink.api.common.RuntimeExecutionMode; import org.apache.flink.api.common.RuntimeExecutionMode;
...@@ -326,6 +327,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment { ...@@ -326,6 +327,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment {
} else if (operation instanceof ResetOperation) { } else if (operation instanceof ResetOperation) {
callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap); callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap);
return true; return true;
} else if (operation instanceof CustomSetOperation) {
CustomSetOperation customSetOperation = (CustomSetOperation) operation;
if (customSetOperation.isValid()) {
callSet(
new SetOperation(customSetOperation.getKey(), customSetOperation.getValue()),
getStreamExecutionEnvironment(),
setMap);
}
return true;
} }
} }
return false; return false;
......
...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts; ...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts;
import org.dinky.data.model.LineageRel; import org.dinky.data.model.LineageRel;
import org.dinky.data.result.SqlExplainResult; import org.dinky.data.result.SqlExplainResult;
import org.dinky.parser.CustomParserImpl; import org.dinky.parser.CustomParserImpl;
import org.dinky.trans.ddl.CustomSetOperation;
import org.dinky.utils.LineageContext; import org.dinky.utils.LineageContext;
import org.apache.flink.api.dag.Transformation; import org.apache.flink.api.dag.Transformation;
...@@ -113,6 +114,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment { ...@@ -113,6 +114,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment {
} else if (operation instanceof ResetOperation) { } else if (operation instanceof ResetOperation) {
callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap); callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap);
return true; return true;
} else if (operation instanceof CustomSetOperation) {
CustomSetOperation customSetOperation = (CustomSetOperation) operation;
if (customSetOperation.isValid()) {
callSet(
new SetOperation(customSetOperation.getKey(), customSetOperation.getValue()),
getStreamExecutionEnvironment(),
setMap);
}
return true;
} }
} }
return false; return false;
......
...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts; ...@@ -23,6 +23,7 @@ import org.dinky.assertion.Asserts;
import org.dinky.data.model.LineageRel; import org.dinky.data.model.LineageRel;
import org.dinky.data.result.SqlExplainResult; import org.dinky.data.result.SqlExplainResult;
import org.dinky.operations.CustomNewParserImpl; import org.dinky.operations.CustomNewParserImpl;
import org.dinky.trans.ddl.CustomSetOperation;
import org.dinky.utils.LineageContext; import org.dinky.utils.LineageContext;
import org.apache.flink.api.dag.Transformation; import org.apache.flink.api.dag.Transformation;
...@@ -114,6 +115,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment { ...@@ -114,6 +115,15 @@ public class CustomTableEnvironmentImpl extends AbstractCustomTableEnvironment {
} else if (operation instanceof ResetOperation) { } else if (operation instanceof ResetOperation) {
callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap); callReset((ResetOperation) operation, getStreamExecutionEnvironment(), setMap);
return true; return true;
} else if (operation instanceof CustomSetOperation) {
CustomSetOperation customSetOperation = (CustomSetOperation) operation;
if (customSetOperation.isValid()) {
callSet(
new SetOperation(customSetOperation.getKey(), customSetOperation.getValue()),
getStreamExecutionEnvironment(),
setMap);
}
return true;
} }
} }
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