qiaojialin commented on a change in pull request #1290:
URL: https://github.com/apache/incubator-iotdb/pull/1290#discussion_r432908620



##########
File path: 
server/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java
##########
@@ -1475,7 +1475,15 @@ long parseTimeFormat(String timestampStr) throws 
SQLParserException {
       throw new SQLParserException("input timestamp cannot be empty");
     }
     if (timestampStr.equalsIgnoreCase(SQLConstant.NOW_FUNC)) {
-      return System.currentTimeMillis();
+      String timePrecision = 
IoTDBDescriptor.getInstance().getConfig().getTimestampPrecision();
+      switch (timePrecision) {
+        case "ns":
+          return System.currentTimeMillis() * 1000_000L;

Review comment:
       System.nanoTime is not the current time in nano second, it is usually 
used for timing:
   
   long start = System.nanoTime();
   long elapse = System.nanoTime() - start;
   
   And, there is no System. microsecond()...




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to