Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to_ieee754_32: mismatch value between Presto/Velox #12345

Open
peterenescu opened this issue Feb 14, 2025 · 0 comments
Open

to_ieee754_32: mismatch value between Presto/Velox #12345

peterenescu opened this issue Feb 14, 2025 · 0 comments
Labels
bug Something isn't working fuzzer-found

Comments

@peterenescu
Copy link
Contributor

peterenescu commented Feb 14, 2025

Description

to_ieee754_32 mismatch caught during fuzzer run

Reproduction

(Presto followed by Velox)

presto:di> SELECT to_ieee754_32(sign(mod(REAL '0.987520694732666', floor(((real '0.4021803140640259'+ real '0.8861451745033264')- real '0.4312475323677063')))));
    _col0             
-------------
 ff c0 00 00 
(1 row)
presto:di> select to_ieee754_32(sign(mod(REAL '0.987520694732666', floor(((c0 + c1) - c2))))) from (values (real '0.4021803140640259', real '0.8861451745033264', real '0.4312475323677063') ) t(c0,c1,c2);
    _col0             
-------------
 7f c0 00 00 
(1 row)

Relevant logs

Additional nested queries prove identical between the two systems.


presto:di> select sign(mod(REAL '0.987520694732666', floor(((real '0.4021803140640259'+ real '0.8861451745033264')- real '0.4312475323677063')))); 
 _col0                
-------
   NaN 
(1 row)
presto:di> select sign(mod(REAL '0.987520694732666', floor(((c0 + c1) - c2)))) from (values (real '0.4021803140640259', real '0.8861451745033264', real '0.4312475323677063') ) t(c0,c1,c2);
 _col0                
-------
   NaN 
(1 row)
presto:di> 

to_ieee754_32 mismatch propagates to spooky_hash_v2_32 during fuzzer run:

presto:di> SELECT spooky_hash_v2_32(to_ieee754_32(sign(mod(REAL '0.987520694732666', floor(((c0 + c1) - c2)))))) from (values (real '0.4021803140640259', real '0.8861451745033264', real '0.4312475323677063') ) t(c0,c1,c2);
    _col0             
-------------
 03 1c 0a 2e 
(1 row)
presto:di> SELECT spooky_hash_v2_32(to_ieee754_32(sign(mod(REAL '0.987520694732666', floor(((real '0.4021803140640259'+ real '0.8861451745033264')- real '0.4312475323677063'))))));
    _col0             
-------------
 89 0a 47 a0 
(1 row)
@peterenescu peterenescu added bug Something isn't working fuzzer Issues related the to Velox fuzzer test components. fuzzer-found labels Feb 14, 2025
@peterenescu peterenescu changed the title to_ieee754_32: mismatch value to_ieee754_32: mismatch value between Presto/Velox Feb 20, 2025
@peterenescu peterenescu removed fuzzer Issues related the to Velox fuzzer test components. fuzzer-found labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fuzzer-found
Projects
None yet
Development

No branches or pull requests

2 participants