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
Conversation
RYH61
commented
Mar 9, 2022
•
edited by HTHou
edited by HTHou
@MarcosZyk Can you please take a look if you have time? |
There was a problem hiding this 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.
server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~
Hi, consider updating the API? Java, python, c++… |
|
||
创建对齐时间序列 | ||
|
||
``` | ||
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)) |
There was a problem hiding this comment.
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.
iotdb/docs/zh/UserGuide/Operate-Metadata/Timeseries.md
Lines 56 to 66 in 2f78450
## 创建对齐时间序列 | |
创建一组对齐时间序列的SQL语句如下所示: | |
``` | |
IoTDB> CREATE ALIGNED TIMESERIES root.ln.wf01.GPS(latitude FLOAT encoding=PLAIN compressor=SNAPPY, longitude FLOAT encoding=PLAIN compressor=SNAPPY) | |
``` | |
一组对齐序列中的序列可以有不同的数据类型、编码方式以及压缩方式。 | |
对齐的时间序列暂不支持设置别名、标签、属性。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
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) |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
iotdb/docs/UserGuide/API/Programming-Java-Native-API.md
Lines 150 to 157 in 2f78450
* 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok