Unverified Commit 0f5acd0d authored by SeungwanJo's avatar SeungwanJo Committed by GitHub

[FIX-3402][dinky-core] edit: print statement query template (#3403)

create table only it does not exist.
parent ecd6ff95
...@@ -36,7 +36,8 @@ public class PrintStatementExplainer { ...@@ -36,7 +36,8 @@ public class PrintStatementExplainer {
public static final String PATTERN_STR = "PRINT (.+)"; public static final String PATTERN_STR = "PRINT (.+)";
public static final Pattern PATTERN = Pattern.compile(PATTERN_STR, Pattern.CASE_INSENSITIVE); public static final Pattern PATTERN = Pattern.compile(PATTERN_STR, Pattern.CASE_INSENSITIVE);
public static final String CREATE_SQL_TEMPLATE = "CREATE TABLE print_{0} WITH (''connector'' = ''printnet'', " public static final String CREATE_SQL_TEMPLATE =
"CREATE TABLE IF NOT EXISTS print_{0} WITH (''connector'' = ''printnet'', "
+ "''port''=''{2,number,#}'', ''hostName'' = ''{1}'')\n" + "''port''=''{2,number,#}'', ''hostName'' = ''{1}'')\n"
+ "AS SELECT * FROM {0}"; + "AS SELECT * FROM {0}";
public static final int DEFAULT_PORT = 7125; public static final int DEFAULT_PORT = 7125;
......
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