You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "HTHou (via GitHub)" <gi...@apache.org> on 2023/05/16 07:55:56 UTC
[GitHub] [iotdb] HTHou commented on issue #9861: cli使用cast函数报错
HTHou commented on issue #9861:
URL: https://github.com/apache/iotdb/issues/9861#issuecomment-1549178190
https://iotdb.apache.org/zh/UserGuide/V1.1.x/Operators-Functions/Conversion.html#cast
```
IoTDB> show timeseries root.sg.d1.*;
+-------------+-----+-------------+--------+--------+-----------+----+----------+
| timeseries|alias| database|dataType|encoding|compression|tags|attributes|
+-------------+-----+-------------+--------+--------+-----------+----+----------+
|root.sg.d1.s3| null| root.sg| FLOAT| RLE| SNAPPY|null| null|
|root.sg.d1.s4| null| root.sg| DOUBLE| RLE| SNAPPY|null| null|
|root.sg.d1.s5| null| root.sg| TEXT| PLAIN| SNAPPY|null| null|
|root.sg.d1.s6| null| root.sg| BOOLEAN| RLE| SNAPPY|null| null|
|root.sg.d1.s1| null| root.sg| INT32| RLE| SNAPPY|null| null|
|root.sg.d1.s2| null| root.sg| INT64| RLE| SNAPPY|null| null|
+-------------+-----+-------------+--------+--------+-----------+----+----------+
Total line number = 6
It costs 0.006s
IoTDB> select * from root.sg.d1;
+-----------------------------+-------------+-------------+-------------+-------------+-------------+-------------+
| Time|root.sg.d1.s3|root.sg.d1.s4|root.sg.d1.s5|root.sg.d1.s6|root.sg.d1.s1|root.sg.d1.s2|
+-----------------------------+-------------+-------------+-------------+-------------+-------------+-------------+
|1970-01-01T08:00:00.001+08:00| 1.1| 1.1| test| false| 1| 1|
|1970-01-01T08:00:00.002+08:00| -2.2| -2.2| false| true| -2| -2|
|1970-01-01T08:00:00.003+08:00| 0.0| 0.0| true| true| 0| 0|
+-----------------------------+-------------+-------------+-------------+-------------+-------------+-------------+
Total line number = 3
It costs 0.009s
IoTDB> select cast(s1, 'type'='BOOLEAN'), cast(s2, 'type'='BOOLEAN'), cast(s3, 'type'='BOOLEAN'), cast(s4, 'type'='BOOLEAN'), cast(s5, 'type'='BOOLEAN') from root.sg.d1;
+-----------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+
| Time|cast(root.sg.d1.s1, "type"="BOOLEAN")|cast(root.sg.d1.s2, "type"="BOOLEAN")|cast(root.sg.d1.s3, "type"="BOOLEAN")|cast(root.sg.d1.s4, "type"="BOOLEAN")|cast(root.sg.d1.s5, "type"="BOOLEAN")|
+-----------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+
|1970-01-01T08:00:00.001+08:00| true| true| true| true| true|
|1970-01-01T08:00:00.002+08:00| true| true| true| true| false|
|1970-01-01T08:00:00.003+08:00| false| false| false| false| true|
+-----------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+
Total line number = 3
It costs 0.012s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org