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 2022/02/22 12:16:07 UTC

[GitHub] [iotdb] jun0315 opened a new pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

jun0315 opened a new pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104


   see https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1808


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47127972/badge)](https://coveralls.io/builds/47127972)
   
   Coverage increased (+0.1%) to 67.778% when pulling **324c08c6e0d7948951d9aa2195061277e60d6531 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47194341/badge)](https://coveralls.io/builds/47194341)
   
   Coverage increased (+0.03%) to 67.899% when pulling **f63455b11061c1709e14a3be8f02e10d08ef2dbc on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47197527/badge)](https://coveralls.io/builds/47197527)
   
   Coverage increased (+0.04%) to 67.91% when pulling **1b6cc36e4c284723bdcbf6dcba65f56d6cfd17da on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47124278/badge)](https://coveralls.io/builds/47124278)
   
   Coverage increased (+0.2%) to 67.818% when pulling **9b3038ff88f795e602769d446381f60f950575f7 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47152305/badge)](https://coveralls.io/builds/47152305)
   
   Coverage increased (+0.1%) to 67.806% when pulling **218b897198d0ec6392e56328a1c2526615d90427 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47117578/badge)](https://coveralls.io/builds/47117578)
   
   Coverage increased (+0.2%) to 67.831% when pulling **8d88552239aa039b20151ab025c69002649ce429 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47269533/badge)](https://coveralls.io/builds/47269533)
   
   Coverage increased (+0.01%) to 67.877% when pulling **fa61c6d2ca875f24d666510e69f871fcd2f8e896 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/46878437/badge)](https://coveralls.io/builds/46878437)
   
   Coverage increased (+0.003%) to 67.814% when pulling **29e19b495a67cb9fdc279865cf173bce5fb6af73 on jun0315:influx_query** into **aa9efee3905bc0ba78b6c61b1e9207daf99d0d19 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47154755/badge)](https://coveralls.io/builds/47154755)
   
   Coverage increased (+0.2%) to 67.827% when pulling **a6dd16fe65bbae7332c546784da99f8e7eea62ae on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47158025/badge)](https://coveralls.io/builds/47158025)
   
   Coverage increased (+0.1%) to 67.808% when pulling **4b39efae789b2223725275e3acf8e51341898f3d on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47075845/badge)](https://coveralls.io/builds/47075845)
   
   Coverage increased (+0.06%) to 67.731% when pulling **1cc066acf69eba91ce23369e9d3c56b6326bcdeb on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47034436/badge)](https://coveralls.io/builds/47034436)
   
   Coverage increased (+0.01%) to 67.679% when pulling **b7af3bf2041fd4a5680fe8ac80b4858580bd9408 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47208009/badge)](https://coveralls.io/builds/47208009)
   
   Coverage increased (+0.02%) to 67.886% when pulling **b5f5995281289bfebfbad3b4cb1347f4c53254d0 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47130139/badge)](https://coveralls.io/builds/47130139)
   
   Coverage increased (+0.1%) to 67.808% when pulling **3500ce2c4d9729160540bd1547ea96a2d08d7549 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47152824/badge)](https://coveralls.io/builds/47152824)
   
   Coverage increased (+0.1%) to 67.805% when pulling **218b897198d0ec6392e56328a1c2526615d90427 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47154547/badge)](https://coveralls.io/builds/47154547)
   
   Coverage increased (+0.2%) to 67.846% when pulling **a6dd16fe65bbae7332c546784da99f8e7eea62ae on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47075736/badge)](https://coveralls.io/builds/47075736)
   
   Coverage increased (+0.1%) to 67.768% when pulling **1cc066acf69eba91ce23369e9d3c56b6326bcdeb on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47198362/badge)](https://coveralls.io/builds/47198362)
   
   Coverage increased (+0.05%) to 67.918% when pulling **1b6cc36e4c284723bdcbf6dcba65f56d6cfd17da on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#discussion_r830626107



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/MathUtils.java
##########
@@ -77,4 +79,55 @@ public static double roundWithGivenPrecision(double data) {
                     * Math.pow(10, TSFileDescriptor.getInstance().getConfig().getFloatPrecision())))
             / Math.pow(10, TSFileDescriptor.getInstance().getConfig().getFloatPrecision());
   }
+
+  /**
+   * calculate sum of list
+   *
+   * @param data need to calculate list
+   * @return sum of list
+   */
+  public static double sum(List<Double> data) {
+    double sum = 0;
+    for (Double datum : data) {
+      sum = sum + datum;
+    }
+    return sum;
+  }
+
+  /**
+   * calculate mean of list
+   *
+   * @param data need to calculate list
+   * @return mean of list
+   */
+  public static double mean(List<Double> data) {
+    return sum(data) / data.size();
+  }
+
+  /**
+   * calculate pop variance of list
+   *
+   * @param data need to calculate list
+   * @return pop variance of list
+   */
+  public static double popVariance(List<Double> data) {
+    double variance = 0;
+    for (int i = 0; i < data.size(); i++) {
+      variance = variance + (Math.pow((data.get(i) - mean(data)), 2));
+    }
+    variance = variance / data.size();
+    return variance;
+  }
+
+  /**
+   * calculate pop std dev of list
+   *
+   * @param data need to calculate list
+   * @return pop std dev of list
+   */
+  public static double popStdDev(List<Double> data) {
+    double std_dev;
+    std_dev = Math.sqrt(popVariance(data));
+    return std_dev;

Review comment:
       ```suggestion
       return Math.sqrt(popVariance(data));
   ```




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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47075522/badge)](https://coveralls.io/builds/47075522)
   
   Coverage increased (+0.05%) to 67.718% when pulling **1cc066acf69eba91ce23369e9d3c56b6326bcdeb on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47192446/badge)](https://coveralls.io/builds/47192446)
   
   Coverage increased (+0.05%) to 67.915% when pulling **5f75bbfcc96897351a3c5696057b4b5bca085697 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47197098/badge)](https://coveralls.io/builds/47197098)
   
   Coverage increased (+0.02%) to 67.885% when pulling **1b6cc36e4c284723bdcbf6dcba65f56d6cfd17da on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47226601/badge)](https://coveralls.io/builds/47226601)
   
   Coverage increased (+0.02%) to 67.883% when pulling **74c49aebaa2b24b51a3f81d16f7e2d2d7cd4119d on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/46808200/badge)](https://coveralls.io/builds/46808200)
   
   Coverage increased (+0.02%) to 67.827% when pulling **712e48f0f09abe0b5fcd43517ba09217beb7762b on jun0315:influx_query** into **aa9efee3905bc0ba78b6c61b1e9207daf99d0d19 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47124638/badge)](https://coveralls.io/builds/47124638)
   
   Coverage increased (+0.1%) to 67.815% when pulling **9b3038ff88f795e602769d446381f60f950575f7 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47237967/badge)](https://coveralls.io/builds/47237967)
   
   Coverage increased (+0.008%) to 67.876% when pulling **abf663c46147aaa52311f09c47d37c47e4fa9056 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47239386/badge)](https://coveralls.io/builds/47239386)
   
   Coverage decreased (-0.03%) to 67.839% when pulling **abf663c46147aaa52311f09c47d37c47e4fa9056 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47112915/badge)](https://coveralls.io/builds/47112915)
   
   Coverage increased (+0.1%) to 67.802% when pulling **23a2b8741add869110e4f731c5fc7daa73d6a2d4 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#discussion_r823449495



##########
File path: server/src/main/java/org/apache/iotdb/db/protocol/influxdb/meta/InfluxDBMetaManager.java
##########
@@ -60,7 +60,7 @@ public static InfluxDBMetaManager getInstance() {
   }
 
   // TODO avoid OOM
-  private static Map<String, Map<String, Map<String, Integer>>> database2Measurement2TagOrders =
+  public static Map<String, Map<String, Map<String, Integer>>> database2Measurement2TagOrders =

Review comment:
       getter / setter




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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
SteveYurongSu commented on a change in pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#discussion_r823457607



##########
File path: thrift-influxdb/src/main/thrift/influxdb.thrift
##########
@@ -81,6 +81,25 @@ struct TSCreateDatabaseReq{
   2: required string database
 }
 
+// WritePoints()
+// write points in influxdb
+struct TSQueryReq{
+  // The session to execute the statement against
+  1: required i64 sessionId
+
+  2: required string command
+  3: required string database
+}
+
+// WritePoints()
+// write points in influxdb
+struct TSQueryResultRsp{
+  1: required TSStatus status
+
+  2: optional string ResultJsonString

Review comment:
       ```suggestion
     2: optional string resultJsonString
   ```

##########
File path: thrift-influxdb/src/main/thrift/influxdb.thrift
##########
@@ -81,6 +81,25 @@ struct TSCreateDatabaseReq{
   2: required string database
 }
 
+// WritePoints()
+// write points in influxdb
+struct TSQueryReq{
+  // The session to execute the statement against
+  1: required i64 sessionId
+
+  2: required string command
+  3: required string database
+}
+
+// WritePoints()
+// write points in influxdb

Review comment:
       ?

##########
File path: server/src/main/java/org/apache/iotdb/db/utils/InfluxDBUtils.java
##########
@@ -0,0 +1,916 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.db.utils;
+
+import org.apache.iotdb.db.auth.AuthException;
+import org.apache.iotdb.db.conf.IoTDBConstant;
+import org.apache.iotdb.db.exception.StorageEngineException;
+import org.apache.iotdb.db.exception.metadata.MetadataException;
+import org.apache.iotdb.db.exception.query.QueryProcessException;
+import org.apache.iotdb.db.protocol.influxdb.constant.InfluxConstant;
+import org.apache.iotdb.db.protocol.influxdb.constant.InfluxSQLConstant;
+import org.apache.iotdb.db.protocol.influxdb.function.InfluxFunction;
+import org.apache.iotdb.db.protocol.influxdb.function.InfluxFunctionFactory;
+import org.apache.iotdb.db.protocol.influxdb.function.InfluxFunctionValue;
+import org.apache.iotdb.db.protocol.influxdb.function.aggregator.InfluxAggregator;
+import org.apache.iotdb.db.protocol.influxdb.function.selector.InfluxSelector;
+import org.apache.iotdb.db.protocol.influxdb.meta.InfluxDBMetaManager;
+import org.apache.iotdb.db.protocol.influxdb.operator.InfluxQueryOperator;
+import org.apache.iotdb.db.protocol.influxdb.operator.InfluxSelectComponent;
+import org.apache.iotdb.db.qp.constant.FilterConstant;
+import org.apache.iotdb.db.qp.logical.Operator;
+import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator;
+import org.apache.iotdb.db.qp.logical.crud.FilterOperator;
+import org.apache.iotdb.db.qp.physical.crud.QueryPlan;
+import org.apache.iotdb.db.query.context.QueryContext;
+import org.apache.iotdb.db.query.dataset.AlignByDeviceDataSet;
+import org.apache.iotdb.db.query.expression.Expression;
+import org.apache.iotdb.db.query.expression.ResultColumn;
+import org.apache.iotdb.db.query.expression.unary.FunctionExpression;
+import org.apache.iotdb.db.query.expression.unary.TimeSeriesOperand;
+import org.apache.iotdb.db.service.basic.ServiceProvider;
+import org.apache.iotdb.service.rpc.thrift.TSStatus;
+import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException;
+import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException;
+import org.apache.iotdb.tsfile.read.common.Field;
+import org.apache.iotdb.tsfile.read.common.RowRecord;
+import org.apache.iotdb.tsfile.read.expression.IExpression;
+import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression;
+import org.apache.iotdb.tsfile.read.filter.ValueFilter;
+import org.apache.iotdb.tsfile.read.filter.basic.Filter;
+import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet;
+
+import org.apache.thrift.TException;
+import org.influxdb.InfluxDBException;
+import org.influxdb.dto.QueryResult;
+
+import java.io.*;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+public class InfluxDBUtils {

Review comment:
       Split into multi classes.

##########
File path: thrift-influxdb/src/main/thrift/influxdb.thrift
##########
@@ -81,6 +81,25 @@ struct TSCreateDatabaseReq{
   2: required string database
 }
 
+// WritePoints()
+// write points in influxdb

Review comment:
       ```suggestion
   // WritePoints()
   // write points in influxdb
   ```




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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] SteveYurongSu merged pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
SteveYurongSu merged pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104


   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/46768070/badge)](https://coveralls.io/builds/46768070)
   
   Coverage decreased (-0.01%) to 67.799% when pulling **b46e82ed00972b44a704193e10dbb1b01d1e69ea on jun0315:influx_query** into **aa9efee3905bc0ba78b6c61b1e9207daf99d0d19 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/46841151/badge)](https://coveralls.io/builds/46841151)
   
   Coverage decreased (-0.002%) to 67.81% when pulling **f4836583bc00108b99b87ecfc0453e1c82689f6d on jun0315:influx_query** into **aa9efee3905bc0ba78b6c61b1e9207daf99d0d19 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47034410/badge)](https://coveralls.io/builds/47034410)
   
   Coverage increased (+0.009%) to 67.676% when pulling **b7af3bf2041fd4a5680fe8ac80b4858580bd9408 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47167915/badge)](https://coveralls.io/builds/47167915)
   
   Coverage increased (+0.2%) to 67.873% when pulling **2db38f484af7ea5de4da01e7206c8adbbdfd43d1 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47132030/badge)](https://coveralls.io/builds/47132030)
   
   Coverage increased (+0.1%) to 67.799% when pulling **3500ce2c4d9729160540bd1547ea96a2d08d7549 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47150672/badge)](https://coveralls.io/builds/47150672)
   
   Coverage increased (+0.1%) to 67.802% when pulling **207f575ac34b326b234dcab5d74b351a109e28a2 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47130534/badge)](https://coveralls.io/builds/47130534)
   
   Coverage increased (+0.1%) to 67.778% when pulling **3500ce2c4d9729160540bd1547ea96a2d08d7549 on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47255682/badge)](https://coveralls.io/builds/47255682)
   
   Coverage decreased (-0.006%) to 67.861% when pulling **1fdf521ef6b740e5a308452bc325d1d2c823d821 on jun0315:influx_query** into **270fcc33aba917361ad61b2b1d08e8f96e5ddeb1 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #5104: [IOTDB-1808] Compatibility of Apache IoTDB with InfluxDB - Query Func

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #5104:
URL: https://github.com/apache/iotdb/pull/5104#issuecomment-1047799682


   
   [![Coverage Status](https://coveralls.io/builds/47154073/badge)](https://coveralls.io/builds/47154073)
   
   Coverage increased (+0.1%) to 67.804% when pulling **a6dd16fe65bbae7332c546784da99f8e7eea62ae on jun0315:influx_query** into **07fb54250bd61430b1381ff50005f417372b1b72 on apache:master**.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org