mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
odps sql format support lowercase option
This commit is contained in:
@@ -18,6 +18,7 @@ package com.alibaba.druid.bvt.sql.odps;
|
||||
import org.junit.Assert;
|
||||
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
import com.alibaba.druid.sql.SQLUtils.FormatOption;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -29,5 +30,13 @@ public class OdpsSelectTest4 extends TestCase {
|
||||
+ "\nFROM dual", SQLUtils.formatOdps(sql));
|
||||
}
|
||||
|
||||
|
||||
public void test_distribute_by_lcase() throws Exception {
|
||||
String sql = "select total_day_cnt * EXP(-datediff(to_date('20150819', 'yyyymmdd'), last_time, 'dd') / 60) from dual";//
|
||||
|
||||
FormatOption option = new FormatOption();
|
||||
option.setUppCase(false);;
|
||||
|
||||
Assert.assertEquals("select total_day_cnt * EXP(-datediff(to_date('20150819', 'yyyymmdd'), last_time, 'dd') / 60)"
|
||||
+ "\nfrom dual", SQLUtils.formatOdps(sql, option));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user