Tips & Tricks

Ignoring NaN Values


For floating point values which are represented as undefined or unrepresentable, Vertica can store NaN (not a number) values. In comparisons against NaN, results will return false whenever NaN is involved. This quick tip will show how to include or ignore NaN values.

First, a table with NaN is needed:

Next, to find values with NaN, column <> column is used:

Lastly, to ignore values with NaN, column = column is used:

On a side note, this would probably make for a fun interview question.

About the author / 

Norbert Krupa

Norbert is the founder of and a Solutions Engineer at Talend. He is an HP Accredited Solutions Expert for Vertica Big Data Solutions. He has written the Vertica Diagnostic Queries which aim to cover monitoring, diagnostics and performance tuning. The views, opinions, and thoughts expressed here do not represent those of the user's employer.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Upcoming Events

  • No upcoming events
AEC v1.0.4

Subscribe to Blog via Email

Enter your email address to subscribe and receive notifications of new posts by email.

Read more use cases here.


This site is not affiliated, endorsed or associated with HPE Vertica. This site makes no claims on ownership of trademark rights. The author contributions on this site are licensed under CC BY-SA 3.0 with attribution required.
%d bloggers like this: