3. Elements of SQL Statements : Predicates in SQL : IS FLOAT Predicate

IS FLOAT Predicate
Use IS FLOAT to determine if a particular result can be assigned to a column of the given data type. It is especially useful for cleaning data or validating data input. When applied to row value expressions, all elements must test the same.
The IS FLOAT predicate takes the following form:
IS [NOT] FLOAT
For example:
x IS FLOAT
is true if x is float in form. If x is a string, then this is true if the value is a number that can be stored as a float data type. All integers and decimals can be represented as float but there may be some loss of accuracy. Any leading or trailing white space is ignored.
If all values in a column pass this predicate then the whole column can be coerced into a float column.
The following predicates are all true:
' +12345 ' IS FLOAT
'1.000000' IS FLOAT
1.0e10 IS FLOAT
DECIMAL('1234567890123456789012345', 25,0) IS FLOAT
'number' IS NOT FLOAT
'123 456' IS NOT FLOAT
'1.0e4000' IS NOT FLOAT
{"ft_lang_label":"__label__en","ft_lang_prob":0.7317431,"math_prob":0.8897923,"size":942,"snap":"2023-14-2023-23","text_gpt3_token_len":237,"char_repetition_ratio":0.14605543,"word_repetition_ratio":0.0,"special_character_ratio":0.2791932,"punctuation_ratio":0.091836736,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9523294,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-21T00:34:29Z\",\"WARC-Record-ID\":\"<urn:uuid:e4705815-0810-462c-9ba5-916e45b31778>\",\"Content-Length\":\"7871\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:546b45ad-cf23-4304-ae12-448314e4e293>\",\"WARC-Concurrent-To\":\"<urn:uuid:463fa59a-0672-4fcd-aa59-5b77573d0561>\",\"WARC-IP-Address\":\"107.23.79.155\",\"WARC-Target-URI\":\"https://docs.actian.com/vectorhadoop/5.0/SQLLang/IS_FLOAT_Predicate.htm\",\"WARC-Payload-Digest\":\"sha1:ISR5FVRCAEGXH4T5NRTID3O5QRM2DIWV\",\"WARC-Block-Digest\":\"sha1:REUKGFZ2IG656DWTA3AJMUZUWFIH4TQS\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296943589.10_warc_CC-MAIN-20230321002050-20230321032050-00399.warc.gz\"}"}