alamb commented on code in PR #5446: URL: https://github.com/apache/arrow-datafusion/pull/5446#discussion_r1124385056
########## datafusion/physical-expr/src/expressions/binary/kernels_arrow.rs: ########## @@ -32,6 +32,14 @@ use std::sync::Arc; // Simple (low performance) kernels until optimized kernels are added to arrow // See https://github.com/apache/arrow-rs/issues/960 +macro_rules! distinct_float { Review Comment: thank you -- this is great ########## datafusion/core/tests/sqllogictests/test_files/pg_compat/pg_compat_simple.slt: ########## @@ -572,6 +572,24 @@ e 4 97 -13181 2047637360 6176835796788944083 158 53000 2042457019 97260165026400 e 5 -86 32514 -467659022 -8012578250188146150 254 2684 2861911482 2126626171973341689 0.12559289 0.014793053078 gxfHWUF8XgY2KdFxigxvNEXe2V2XMl e 5 64 -26526 1689098844 8950618259486183091 224 45253 662099130 16127995415060805595 0.2897315 0.575945048386 56MZa5O1hVtX4c5sbnCfxuX5kDChqI +# distinct_from logic for floats +query BBBBBBBBBBB +select + 'nan'::float is distinct from 'nan'::float v7, + 'nan'::float is not distinct from 'nan'::float v8, + 'nan'::float is not distinct from null v9, + 'nan'::float is distinct from null v10, + null is distinct from 'nan'::float v11, + null is not distinct from 'nan'::float v12, + 1::float is distinct from 2::float v13, + 'nan'::float is distinct from 1::float v14, + 'nan'::float is not distinct from 1::float v15, + 1::float is not distinct from null v16, + 1::float is distinct from null v17 +; +---- +false true false true true false true true false false true Review Comment: ❤️ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
