question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug about inserting NaN

See original GitHub issue

version 0.11.2:

IoTDB> INSERT INTO root.happy.device1.sensor1(timestamp,temperature) values(7925, NaN)
Msg: 500: For input string: "NaN"

version master(0.12.0-SNAPSHOT):

if not created before, print NaN

IoTDB> INSERT INTO root.happy.device1.sensor1(timestamp,temperature) values(7925, NaN)
IoTDB> select * from root
+-----------------------------+--------------------------------------+
|                         Time|root.happy.device1.sensor1.temperature|
+-----------------------------+--------------------------------------+
|1970-01-01T08:00:07.925+08:00|                                   NaN|
+-----------------------------+--------------------------------------+

if created before, print 0.0

IoTDB> CREATE TIMESERIES root.happy.device1.sensor1.temperature WITH DATATYPE=DOUBLE, ENCODING=RLE
IoTDB> INSERT INTO root.happy.device1.sensor1(timestamp,temperature) values(7925, NaN)
IoTDB> select * from root
+-----------------------------+--------------------------------------+
|                         Time|root.happy.device1.sensor1.temperature|
+-----------------------------+--------------------------------------+
|1970-01-01T08:00:07.925+08:00|                                   0.0|
+-----------------------------+--------------------------------------+

Should print NaN

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
HTHoucommented, Feb 19, 2021

Another question: should we support NaN or NULL for BOOLEAN, INT32, INT64?

There is a jira issue about this. https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1158?filter=allissues

In my opinion, I agree to support NULL for all value types. As for NaN, I think it can only be float or double type, since this is only defined in JDK classes of Double and Float.

1reaction
rhmangmangcommented, Feb 17, 2021

To solve first problem in version 0.11.2, just Cherry Pick a70701220bdad25be18bb58ee8253c536aed4367 from master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BUG: IntervalIndex.insert does not work for inserting NaN ...
IntervalIndex.insert fails to insert NaN . Note that NaN should be valid to insert, as you can construct an IntervalIndex with NaN :...
Read more >
Tensorflow NaN bug? - Stack Overflow
Since none of my values is very high, the only way a NaN can happen is by a badly handled 0/0, but since...
Read more >
MySQL Bugs: #74934: NaN not supported
Description: mysql-connector-python doesn't support the python float NaN How to repeat: Try inserting NaN cur.execute('INSERT INTO ...
Read more >
Bug report "Position: NaN NaN" - Apple Community
Bug report "Position: NaN NaN". Repro steps: On any slide, insert a line (menu "Insert">"Line">"Line"). With the new line selected, ...
Read more >
bug #61711, Test errors for sorting NaN values... [Savannah]
When compiling with visibility flags some tests are failing on Windows. They all seem to be related to functions that involve sorting NaN...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found