You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "simonvandel (via GitHub)" <gi...@apache.org> on 2023/12/01 11:01:14 UTC
Re: [PR] Allow default value on lag/lead if they are coerceable to value [arrow-datafusion]
simonvandel commented on code in PR #8308:
URL: https://github.com/apache/arrow-datafusion/pull/8308#discussion_r1411940640
##########
datafusion/physical-expr/src/window/lead_lag.rs:
##########
@@ -238,9 +238,8 @@ fn get_default_value(
) -> Result<ScalarValue> {
if let Some(default_value) = default_value {
let default_value_type = default_value.data_type();
- if can_coerce_from(dtype, &default_value_type)
- || (dtype.is_integer() && default_value_type.is_integer())
- {
+
+ if comparison_coercion(&default_value_type, dtype).is_some() {
Review Comment:
So just to be clear, are you suggesting that the comparison should be reverted to
```rust
if can_coerce_from(dtype, &default_value_type)
// We explicitely allow a lossy conversion between signed and unsigned integers
|| (dtype.is_integer() && default_value_type.is_integer())
```
?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org