Skip to content

Commit

Permalink
[FIX-3402][dinky-core] edit: print statement query template (DataLink…
Browse files Browse the repository at this point in the history
…DC#3403)

create table only it does not exist.
  • Loading branch information
joswlv authored Apr 15, 2024
1 parent ecd6ff9 commit 0f5acd0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ public class PrintStatementExplainer {
public static final String PATTERN_STR = "PRINT (.+)";
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'', "
+ "''port''=''{2,number,#}'', ''hostName'' = ''{1}'')\n"
+ "AS SELECT * FROM {0}";
public static final String CREATE_SQL_TEMPLATE =
"CREATE TABLE IF NOT EXISTS print_{0} WITH (''connector'' = ''printnet'', "
+ "''port''=''{2,number,#}'', ''hostName'' = ''{1}'')\n"
+ "AS SELECT * FROM {0}";
public static final int DEFAULT_PORT = 7125;

public static String[] getTableNames(String statement) {
Expand Down

0 comments on commit 0f5acd0

Please sign in to comment.