bug fixed for odps sql parser. issue #1495

This commit is contained in:
wenshao
2016-11-18 22:02:21 +08:00
parent a2936b08af
commit 1ee8776eb4
2 changed files with 21 additions and 0 deletions
@@ -0,0 +1,17 @@
package com.alibaba.druid.bvt.sql.odps;
import com.alibaba.druid.sql.SQLUtils;
import junit.framework.TestCase;
/**
* Created by wenshao on 2016/11/18.
*/
public class OdpsInsertTest2 extends TestCase {
public void test_for_insert_select_limit() throws Exception {
String sql = "insert into table a select * from b limit 1";
assertEquals("INSERT INTO TABLE a\n" +
"SELECT *\n" +
"FROM b\n" +
"LIMIT 1", SQLUtils.formatOdps(sql));
}
}