Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOTDB-2524] Aligned Timeseries support tags and attributes #5191

Merged
merged 3 commits into from Mar 16, 2022

Conversation

RYH61
Copy link
Contributor

@RYH61 RYH61 commented Mar 9, 2022

IoTDB> create aligned timeseries root.sg1.d1(s1 INT32 tags(tag1=v1, tag2=v2) attributes(attr1=v1, attr2=v2), s2 DOUBLE tags(tag3=v3, tag4=v4) attributes(attr3=v3, attr4=v4))

IoTDB> show timeseries
+--------------+-----+-------------+--------+--------+-----------+-------------------------+---------------------------+
| timeseries|alias|storage group|dataType|encoding|compression| tags| attributes|
+--------------+-----+-------------+--------+--------+-----------+-------------------------+---------------------------+
|root.sg1.d1.s1| null| root.sg1| INT32| RLE| SNAPPY|{"tag1":"v1","tag2":"v2"}|{"attr2":"v2","attr1":"v1"}|
|root.sg1.d1.s2| null| root.sg1| DOUBLE| GORILLA| SNAPPY|{"tag4":"v4","tag3":"v3"}|{"attr4":"v4","attr3":"v3"}|
+--------------+-----+-------------+--------+--------+-----------+-------------------------+---------------------------+

@coveralls
Copy link

coveralls commented Mar 9, 2022

Coverage Status

Coverage decreased (-2.3%) to 65.575% when pulling c34cb8c on RYH61:renyuhua into 064010c on apache:master.

@mychaow mychaow requested a review from HTHou March 14, 2022 02:12
@HTHou
Copy link
Contributor

HTHou commented Mar 14, 2022

@MarcosZyk Can you please take a look if you have time?

Copy link
Contributor

@MarcosZyk MarcosZyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! Only one problem exists. Please have a look.

Copy link
Contributor

@MarcosZyk MarcosZyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@HTHou
Copy link
Contributor

HTHou commented Mar 14, 2022

Hi, consider updating the API? Java, python, c++…
Also, don’t forget update the user guide for new feature.

Comment on lines +307 to +311

创建对齐时间序列

```
create aligned timeseries root.sg1.d1(s1 INT32 tags(tag1=v1, tag2=v2) attributes(attr1=v1, attr2=v2), s2 DOUBLE tags(tag3=v3, tag4=v4) attributes(attr3=v3, attr4=v4))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, you can modify this part of the doc.

## 创建对齐时间序列
创建一组对齐时间序列的SQL语句如下所示:
```
IoTDB> CREATE ALIGNED TIMESERIES root.ln.wf01.GPS(latitude FLOAT encoding=PLAIN compressor=SNAPPY, longitude FLOAT encoding=PLAIN compressor=SNAPPY)
```
一组对齐序列中的序列可以有不同的数据类型、编码方式以及压缩方式。
对齐的时间序列暂不支持设置别名、标签、属性。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment on lines 506 to +511
List<TSDataType> dataTypes,
List<TSEncoding> encodings,
List<CompressionType> compressors,
List<String> measurementAliasList)
List<String> measurementAliasList,
List<Map<String, String>> tagsList,
List<Map<String, String>> attributesList)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, adding a new interface rather than changing the old one is better for compatibility...

Copy link
Contributor

@HTHou HTHou Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And don't forget update the doc of API.

* Create aligned timeseries
```
void createAlignedTimeseries(String prefixPath, List<String> measurements,
List<TSDataType> dataTypes, List<TSEncoding> encodings,
CompressionType compressor, List<String> measurementAliasList);
```
Attention: Alias of measurements are **not supported** currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@qiaojialin qiaojialin merged commit 1ff6db9 into apache:master Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants