improved odps sql parser, support udf

This commit is contained in:
shaojin.wensj
2015-07-15 13:16:18 +08:00
parent e7185c4b25
commit 41af4e97a8
4 changed files with 48 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.alibaba.druid.bvt.sql.odps;
import org.junit.Assert;
import com.alibaba.druid.sql.SQLUtils;
import junit.framework.TestCase;
public class OdpsUDFTest extends TestCase {
public void test_if() throws Exception {
String sql = "select secods:ip_region('192.168.1.1', 'city') from dual";
Assert.assertEquals("SELECT secods:ip_region('192.168.1.1', 'city')" //
+ "\nFROM dual", SQLUtils.formatOdps(sql));
}
}