refactor mysql ddl partition by clause

This commit is contained in:
高铁
2016-02-25 15:00:53 +08:00
parent e1fa75bae3
commit 25a1bea480
12 changed files with 152 additions and 71 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 ExportConditionsTest5 extends TestCase {
ExportConditions udf = new ExportConditions();
public void test_export_conditions() throws Exception {
String result = udf.evaluate("select * from t where name = 'a1' or name = 'a2'");
Assert.assertEquals("[[\"t\",\"name\",\"=\",[\"a1\",\"a2\"]]]", result);
}
}
@@ -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 ExportConditionsTest6 extends TestCase {
ExportConditions udf = new ExportConditions();
public void test_export_conditions() throws Exception {
String result = udf.evaluate("select * from t where name = 'a1'", "odbps", true);
Assert.assertEquals("[[\"t\",\"name\",\"=\",[\"a1\"]]]", result);
}
}