Why is it necessary to use keyword ‘aligned’ in SQL when inserting a aligned timeseries in Apache IoTDB

I am interested in the new future of IoTDB in version 0.13 about aligned time series. I have read the document about the design of SQL. However, I’m confused about the syntax of the insert statement.

Considering that we may create aligned time series before insertion, why is it necessary to use keyword ‘aligned’ when inserting a aligned timeseries such as insert into root.sg.d2(time, s1, s2) aligned values(1, 1, 2).

My question is: Why can’t we use insert into root.sg.d2(time, s1, s2) values(1, 1, 2) directly? Is is possible to let IoTDB parse SQL based on the metadata of time series, and then insert values as aligned time series automatically?

>Solution :

We need to take the case of automatic schema creation into account. If IoTDB received a SQL about some time series which is not created, IoTDB can create schema of aligned timeseries or normal timeseries based on the presence or absence of keyword ‘aligned’.

Leave a Reply