odps udf support export conditions

This commit is contained in:
高铁
2016-01-31 20:35:55 +08:00
parent 3d34d5689f
commit 43e9209960
2 changed files with 88 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.alibaba.druid.bvt.support.odps.udf;
import org.junit.Assert;
import com.alibaba.druid.support.opds.udf.ExportConditions;
import junit.framework.TestCase;
public class ExportConditionsTest extends TestCase {
ExportConditions udf = new ExportConditions();
public void test_export_conditions() throws Exception {
String result = udf.evaluate("select * from t where id = 3 and name = 'chensheng'");
Assert.assertEquals("[[\"t.id\",\"=\",3],[\"t.name\",\"=\",\"chensheng\"]]", result);
}
}