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