mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for odps sql formatter
This commit is contained in:
@@ -8,12 +8,18 @@ import junit.framework.TestCase;
|
||||
|
||||
public class OdpsFormatCommentTest16 extends TestCase {
|
||||
public void test_column_comment() throws Exception {
|
||||
String sql = "create table t1 (f0 bigint) partitioned by ("
|
||||
String sql = "create table t1 ("
|
||||
+ "\nf0 bigint, -- fc_0"
|
||||
+ "\nf1 string, -- fc_1"
|
||||
+ "\nf2 string -- fc_2"
|
||||
+ "\n) partitioned by ("
|
||||
+ "ds string, -- c_1"
|
||||
+ "\nhh string -- c_2"
|
||||
+ "\n);";
|
||||
Assert.assertEquals("CREATE TABLE t1t1 ("
|
||||
+ "\n\tf0 bigint"
|
||||
+ "\n\tf0 bigint, -- fc_0"
|
||||
+ "\n\tf1 string, -- fc_1"
|
||||
+ "\n\tf2 string -- fc_2"
|
||||
+ "\n)"
|
||||
+ "\nPARTITIONED BY ("
|
||||
+ "\n\tds string, -- c_1"
|
||||
|
||||
Reference in New Issue
Block a user