Tao Yi created IOTDB-4245:
-----------------------------
Summary: Some questions about data type inferring while insert
command in iotdb-client
Key: IOTDB-4245
URL: https://issues.apache.org/jira/browse/IOTDB-4245
Project: Apache IoTDB
Issue Type: Bug
Affects Versions: 0.14.0-SNAPSHOT, 0.13.1
Environment: Windows 10
Reporter: Tao Yi
A copy of https://github.com/apache/iotdb/issues/7042
*Describe the questions*
[The auto create metadata of
document|https://iotdb.apache.org/UserGuide/V0.13.x/Operate-Metadata/Auto-Create-MetaData.html#auto-create-time-series-metadata-infer-data-type-in-the-backend]
told that we can write data when the aim timeseries haven't defined by users
themselves. However, when I try to insert some data, some timeseries can't be
created as document(or the document has't mentioned but it executed
successfully). Is there something I misunder stood or I can't use the data type
inferring like this? I try the following inserts:
1:{{{}insert into root.sg0(timestamp, t0) values(1, 17000000){}}} but it
generated a Float timeseries, which is different from the documents since it
said it will generate a Double timeseries when input = 17000000(> 2^24)
2:{{{}insert into root.sg0(timestamp, t1) values(1, 170000000){}}} and it
generated a Double timeseries.
3:I try to insert a value in scientific notation(the document hasn't mentioned
it) using {{insert into root.sg0(timestamp, t2) values(1, 1.7E8)}} and it
successfully generated a Float timeseries.
4:{{{}insert into root.sg0(timestamp, t3) values(1, 3.5E38){}}} I insert a
value over Float, and I think the database will create a Double timeseries, but
in fact it create a Float timeseries and return a error:{{{}Msg: 313: failed to
insert measurements [t3] caused by The input float value is Infinity{}}}
So my question is:
1:Is the data type inferring CANNOT insert the data using scientific notation?
If yes, why I can create timeseries in operation 3?
2:Is the document something wrong about the range of auto creating? (17000000)
3:Or it's only my misunderstood or wrong operation?
Thanks.
*To Reproduce*
Using all the default settings in IoTDB v0.13.1-all
Run the following iotdb-sql in iotdb-client:
{{insert into root.sg0(timestamp, t0) values(1, 17000000)}}
{{insert into root.sg0(timestamp, t1) values(1, 170000000)}}
{{insert into root.sg0(timestamp, t2) values(1, 1.7E8)}}
{{insert into root.sg0(timestamp, t3) values(1, 3.5E38)}}
{{show timeseries root.**}}
In IoTDB v0.14.0-SNAPSHOT will also get the same result. {{}}
*Screenshots*
[!https://user-images.githubusercontent.com/25195216/185273490-8b805438-976f-49b5-9db6-3b530f44a6c7.png|width=1011,height=200!|https://user-images.githubusercontent.com/25195216/185273490-8b805438-976f-49b5-9db6-3b530f44a6c7.png]
[!https://user-images.githubusercontent.com/25195216/185273515-f2936bd3-9f70-44d7-bdd4-0c74967a015b.png|width=1006,height=297!|https://user-images.githubusercontent.com/25195216/185273515-f2936bd3-9f70-44d7-bdd4-0c74967a015b.png]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)