You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ge...@apache.org on 2020/08/05 10:16:47 UTC
[incubator-iotdb] 02/02: Update LogicalPlanSmallTest.java
This is an automated email from the ASF dual-hosted git repository.
geniuspig pushed a commit to branch fix_check
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
commit c49c628511223a58a7260fe287c8f82033816ead
Author: zhutianci <zh...@gmail.com>
AuthorDate: Wed Aug 5 18:16:23 2020 +0800
Update LogicalPlanSmallTest.java
---
.../iotdb/db/qp/plan/LogicalPlanSmallTest.java | 46 ++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/server/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java b/server/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java
index 2c724bd..e3399fe 100644
--- a/server/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java
@@ -73,6 +73,52 @@ public class LogicalPlanSmallTest {
}
@Test
+ public void checkDataTypeWithEncoding() {
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=BOOLEAN, encoding=GORILLA";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding GORILLA does not support BOOLEAN", e.getMessage());
+ }
+
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=BOOLEAN, encoding=TS_2DIFF";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding TS_2DIFF does not support BOOLEAN", e.getMessage());
+ }
+
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=BOOLEAN, encoding=REGULAR";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding REGULAR does not support BOOLEAN", e.getMessage());
+ }
+
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=INT32, encoding=GORILLA";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding GORILLA does not support INT32", e.getMessage());
+ }
+
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=DOUBLE, encoding=REGULAR";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding REGULAR does not support DOUBLE", e.getMessage());
+ }
+
+ try {
+ String sqlStr = "create timeseries root.sg1.d1.s1 with datatype=TEXT, encoding=GORILLA";
+ parseDriver.parse(sqlStr, IoTDBDescriptor.getInstance().getConfig().getZoneID());
+ } catch (SQLParserException e) {
+ Assert.assertEquals("encoding GORILLA does not support TEXT", e.getMessage());
+ }
+
+ }
+
+ @Test
public void testSlimit() {
String sqlStr = "select * from root.vehicle.d1 limit 10 slimit 1";
RootOperator operator = (RootOperator) parseDriver