tyrobro commented on PR #301: URL: https://github.com/apache/datafusion-spark/pull/301#issuecomment-6925108417
Thanks, addressed all three: 1. Moved STRING casting into simplify() as Expr::Cast/Expr::TryCast (ANSI-aware via info.config_options().execution.enable_ansi_mode), applied before the isnan/CASE rewrite rather than eagerly in invoke_with_args. This keeps the cast inside the CASE branches, so it only runs on selected rows. invoke_with_args no longer has a string special-case at all. Added the exact test case from your Spark output (d/s columns, ANSI on, expecting (1, 1), (NaN, 2)). 2. Collapsed the f32/f64 kernels into a single generic nanvl_generic<T: ArrowPrimitiveType>, parameterized by an is_nan closure; spark_nanvl_f32/spark_nanvl_f64 are now one-liners. Inlined nanvl_from_mask. 3. Added a comment on the volatile-expr1 fallback noting the nanvl(random(), 1/0) ANSI edge case you flagged. Also fixed the .slt nits (trailing newline, duplicate SET). I would be grateful for another review so that the escaped bugs can be resolved and implementations be improved. Thanks a ton. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
