You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Jialin Qiao (Jira)" <ji...@apache.org> on 2020/10/26 09:09:00 UTC

[jira] [Created] (IOTDB-957) SQL Arithmetic Operators

Jialin Qiao created IOTDB-957:
---------------------------------

             Summary: SQL Arithmetic Operators
                 Key: IOTDB-957
                 URL: https://issues.apache.org/jira/browse/IOTDB-957
             Project: Apache IoTDB
          Issue Type: New Feature
          Components: Planner/SQLParser
            Reporter: Jialin Qiao


[https://github.com/apache/iotdb/issues/1855]



copy from github issue:

SQL queries should support SQL arithmetic operators.

Currently
If I run a query such as "select m1+m2 from XYZ.myseries" I get no results.

If I run a query such as "select m3 from XYZ.myseries where mt+ma > 10" I get an exception;
org.apache.iotdb.jdbc.IoTDBSQLException: 401: Filter has some time series don't correspond to any known time series

If I put the arithmetic in bvrckets I get this exception;
org.apache.iotdb.jdbc.IoTDBSQLException: 401: meet error while parsing SQL to physical plan: {}line 3:12 no viable alternative at input 'ma+mt)'

The query should process arithmetic operators.

I am using measurements to send alarms when thresholds are exceeded. Some threshholds are percentages but measurements are stored as true values so I need to calculate a percentage (this is just one example).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)