You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/10/31 11:49:50 UTC

[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #491: fix auto create schema bug

qiaojialin commented on a change in pull request #491: fix auto create schema bug
URL: https://github.com/apache/incubator-iotdb/pull/491#discussion_r341093894
 
 

 ##########
 File path: server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
 ##########
 @@ -94,6 +97,42 @@ public void insert(InsertPlan insertPlan) throws QueryProcessorException {
     }
   }
 
+  private static Object parseValue(TSDataType dataType, String value) throws QueryProcessorException {
+    try {
+      switch (dataType) {
+        case BOOLEAN:
+          value = value.toLowerCase();
+          if (SQLConstant.BOOLEAN_FALSE_NUM.equals(value) || SQLConstant.BOOLEN_FALSE.equals(value)) {
+            return false;
+          } else if (SQLConstant.BOOLEAN_TRUE_NUM.equals(value) || SQLConstant.BOOLEN_TRUE.equals(value)) {
+            return true;
+          } else {
+            throw new QueryProcessorException(
+                "The BOOLEAN data type should be true/TRUE or false/FALSE");
 
 Review comment:
   fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services