Xiangdong Huang created COMDEV-409:
--------------------------------------

             Summary: Apache IoTDB: Complex Arithmetic Operations in SELECT 
Clauses
                 Key: COMDEV-409
                 URL: https://issues.apache.org/jira/browse/COMDEV-409
             Project: Community Development
          Issue Type: Task
          Components: GSoC/Mentoring ideas
            Reporter: Xiangdong Huang


Apache IoTDB [1] is an Open Source IoT database designed to meet the rigorous 
data, storage, and analytics requirements of large-scale Internet of Things 
(IoT) and Industrial Internet of Things (IIoT) applications.

We have recently been working to improve the ease of use of IoTDB. For queries, 
we hope that IoTDB can provide more powerful analysis capabilities.

IOTDB supports many types of queries: raw data queries, function queries 
(including UDF queries), and so on. However, currently there is no easy way to 
combine the results of multiple queries. Therefore, we hope that IoTDB can 
support complex arithmetic operations in the SELECT clause, which will greatly 
improve the analysis capabilities.

Function description:
Applied to: raw time series, literal numbers and function outputs.
Applicable data types: all types except TIMESTAMP and TEXT.
Applicable operators: at least five binary operators ( + , - , * , / , % ) and 
two unary operator (+ , -).

Usage examples:
# raw queries
SELECT -a FROM root.sg.d;
SELECT a, b, c, b * b - 4 * a * c FROM root.sg.d WHERE b > 0;
SELECT a, b, -(bool_value * (a - b)) FROM root.sg.d;
SELECT -3.14 + a / 15 + 926 FROM root.sg.d;
SELECT +a % 3.14 FROM root.sg.d WHERE a < 0;

# function queries
SELECT a + abs(a), sin(a) * cos(a) FROM root.sg.d;
SELECT a, b, sqrt(a) * sqrt(b) / (a * b) FROM FROM root.sg.d WHERE a < 0;

# nested queries
select a, b, a + b + udf(sin(a) * sin(b), cos(a) * cos(b)) FROM root.sg.d;
select a, a + a, sin(sin(sin(a + a))) FROM root.sg.d WHERE a < 0;

Additional requirements:
1. For performance reasons, it's better to perform as few disk read operations 
as possible.
Example:
SELECT a, sin(a + a) FROM root.sg.d WHERE a < 0;
The series root.sg.d.a should be read only once during the query.

2. For performance reasons, it's better to reuse intermediate calculation 
results as much as possible.
Example:
SELECT a + a, sin(a + a) FROM root.sg.d WHERE a < 0;
The intermediate calculation result a + a should only be evaluated once during 
the query.

3. Need to consider memory-constrained scenarios.

What knowledge you need to know:
1. Java
2. Basic database knowledge (such as SQL, etc.)
3. ANTLR
4. IoTDB query process

Links:
[1] iotdb.apache.org



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
For additional commands, e-mail: dev-h...@community.apache.org

Reply via email to