diff --git a/src/test/java/com/alibaba/druid/bvt/sql/PagerUtilsTest_Limit_hive_0.java b/src/test/java/com/alibaba/druid/bvt/sql/PagerUtilsTest_Limit_hive_0.java new file mode 100644 index 0000000000..ba57b89e77 --- /dev/null +++ b/src/test/java/com/alibaba/druid/bvt/sql/PagerUtilsTest_Limit_hive_0.java @@ -0,0 +1,26 @@ +package com.alibaba.druid.bvt.sql; + +import com.alibaba.druid.DbType; +import com.alibaba.druid.sql.PagerUtils; +import com.alibaba.druid.util.JdbcUtils; +import junit.framework.TestCase; +import org.junit.Assert; + +public class PagerUtilsTest_Limit_hive_0 extends TestCase { + + public void test_hive_0() throws Exception { + String result = PagerUtils.limit("SELECT * FROM test", DbType.hive, 0, 10); + System.out.println(result); + Assert.assertEquals("SELECT *\n" + + "FROM test\n" + + "LIMIT 10", result); + } + + public void test_odps_0() throws Exception { + String result = PagerUtils.limit("SELECT * FROM test", DbType.odps, 0, 10); + System.out.println(result); + Assert.assertEquals("SELECT *\n" + + "FROM test\n" + + "LIMIT 10", result); + } +} \ No newline at end of file