You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "waynexia (via GitHub)" <gi...@apache.org> on 2024/05/31 07:57:49 UTC
[I] FIRST/LAST_VALUE behavior changes [datafusion]
waynexia opened a new issue, #10732:
URL: https://github.com/apache/datafusion/issues/10732
### Describe the bug
In #9960, `FIRST_VALUE` and `LAST_VALUE` are moved into another place, but that patch also changes the function signatures. They only accept `NUMERICS` after the PR.
### To Reproduce
Try the following query in CLI:
d201ec742b08fa2a0549fc27f0b39622d67391ab
```sql
SELECT arrow_typeof(FIRST_VALUE('0.1'::DECIMAL(4,1)));
```
Result at d201ec742b08fa2a0549fc27f0b39622d67391ab (before #9960) is
```sql
+----------------------------------------+
| arrow_typeof(FIRST_VALUE(Utf8("0.1"))) |
+----------------------------------------+
| Decimal128(4, 1) |
+----------------------------------------+
```
And after is
```sql
+----------------------------------------+
| arrow_typeof(first_value(Utf8("0.1"))) |
+----------------------------------------+
| Float64 |
+----------------------------------------+
```
### Expected behavior
The output type changes because decimal is not one of `NUMERICS`. I can think of two points:
- Should decimal be one of `NUMERICS`?
- Should first/last value work like before?
My perspective is "yes" for both.
### Additional context
By the way, the function name also changes. From big letters to small letters.
--
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@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] FIRST/LAST_VALUE behavior changes [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #10732:
URL: https://github.com/apache/datafusion/issues/10732#issuecomment-2141454006
It looks like the issue is because of utf8 type, it should be fixed in
#10651
On Fri, May 31, 2024, 3:59 PM Ruihang Xia ***@***.***> wrote:
> cc @jayzhan211 <https://github.com/jayzhan211>. I'd like to make the
> corresponding change if the "expected behavior" looks reasonable.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/datafusion/issues/10732#issuecomment-2141427779>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADZCLR4WJUROVRZZBLFHW4LZFAUUPAVCNFSM6AAAAABISKELY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGQZDONZXHE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] FIRST/LAST_VALUE behavior changes [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 closed issue #10732: FIRST/LAST_VALUE behavior changes
URL: https://github.com/apache/datafusion/issues/10732
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] FIRST/LAST_VALUE behavior changes [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #10732:
URL: https://github.com/apache/datafusion/issues/10732#issuecomment-2142033557
I had checked that this issue is solved in #10651, which I had added the UTF8 to the signature.
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] FIRST/LAST_VALUE behavior changes [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on issue #10732:
URL: https://github.com/apache/datafusion/issues/10732#issuecomment-2148807953
Since #10651 is merged, I close the issue. if there is still any issue, we can reopen it. @waynexia
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] FIRST/LAST_VALUE behavior changes [datafusion]
Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on issue #10732:
URL: https://github.com/apache/datafusion/issues/10732#issuecomment-2141427779
cc @jayzhan211. I'd like to make the corresponding change if the "expected behavior" looks reasonable.
--
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@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org