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 2020/06/04 06:11:02 UTC

[GitHub] [incubator-iotdb] JulianFeinauer commented on a change in pull request #1305: IOTDB-734 Add Support for NaN in Double / Floats in SQL Syntax.

JulianFeinauer commented on a change in pull request #1305:
URL: https://github.com/apache/incubator-iotdb/pull/1305#discussion_r435013169



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java
##########
@@ -65,6 +64,9 @@ public static TSDataType getPredictedDataType(Object value, boolean inferType) {
         } else {
           return floatingStringInferType;
         }
+        // "NaN" is returned if the NaN Literal is given in Parser
+      } else if ("NaN".equals(strValue)) {
+        return TSDataType.DOUBLE;

Review comment:
       Good Hint. Personally I would see Nan as a Double Literal and thus probably use the check on floating_string_infer_type. WDYT?




----------------------------------------------------------------
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