mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved odps sql parser, support udf
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user