File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
core/src/main/java/com/dtstack/flink/sql Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 8585import java .util .Set ;
8686import java .util .concurrent .TimeUnit ;
8787import com .dtstack .flink .sql .option .Options ;
88+ import org .apache .calcite .sql .parser .SqlParser .Config ;
8889
8990/**
9091 * Date: 2018/6/26
@@ -100,6 +101,11 @@ public class Main {
100101
101102 private static final Logger LOG = LoggerFactory .getLogger (Main .class );
102103
104+ private static Config config = org .apache .calcite .sql .parser .SqlParser
105+ .configBuilder ()
106+ .setLex (Lex .MYSQL )
107+ .build ();
108+
103109 public static void main (String [] args ) throws Exception {
104110
105111 OptionParser optionParser = new OptionParser (args );
@@ -174,10 +180,6 @@ private static void sqlTranslation(Options options,StreamTableEnvironment tableE
174180 CreateTmpTableParser .SqlParserResult tmp = sqlTree .getTmpTableMap ().get (tableName );
175181 String realSql = DtStringUtil .replaceIgnoreQuota (result .getExecSql (), "`" , "" );
176182
177- org .apache .calcite .sql .parser .SqlParser .Config config = org .apache .calcite .sql .parser .SqlParser
178- .configBuilder ()
179- .setLex (Lex .MYSQL )
180- .build ();
181183 SqlNode sqlNode = org .apache .calcite .sql .parser .SqlParser .create (realSql ,config ).parseStmt ();
182184 String tmpSql = ((SqlInsert ) sqlNode ).getSource ().toString ();
183185 tmp .setExecSql (tmpSql );
You can’t perform that action at this time.
0 commit comments