mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
odps sql parser improved comment support
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.alibaba.druid.bvt.sql.odps;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
public class OdpsFormatCommentTest29 extends TestCase {
|
||||
public void test_drop_function() throws Exception {
|
||||
String sql = "create table xxxx001( --测试"
|
||||
+ "\ncol string, --测试2"
|
||||
+ "\ncol2 string --测试3"
|
||||
+ "\n)";
|
||||
Assert.assertEquals("CREATE TABLE xxxx001 ( --测试"
|
||||
+ "\n\tcol STRING, --测试2"
|
||||
+ "\n\tcol2 STRING --测试3"
|
||||
+ "\n)", SQLUtils.formatOdps(sql));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user