mbutrovich commented on PR #22051: URL: https://github.com/apache/datafusion/pull/22051#issuecomment-4398278672
> Thanks @mbutrovich @coderfender non valid inputs, like 0, negative and NULL are covered in NTILE `partition_evaluator` ( > > https://github.com/apache/datafusion/blob/2a14a93842bb44c31d07471afa1e886f158c7d6d/datafusion/functions-window/src/ntile.rs#L119 > > ) which called through `create_udwf_window_expr` which DF and also Comet calling. > But I'll add tests to assert it > > UPD: double checked, those tests already in place and passing. So you're saying ```rust if n <= 0 { return exec_err!("NTILE requires a positive integer"); } ``` is dead code then? We should remove it if it's not possible and replace with a `debug_assert` to make the invariant enforced in testing and invisible in release builds. -- 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]
