You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/27 18:06:30 UTC

[GitHub] [arrow-datafusion] alamb opened a new issue, #7118: Panic: `index out of bounds: the len is 0 but the index is 0` in `first_value` / `last_value` when used as an aggregate

alamb opened a new issue, #7118:
URL: https://github.com/apache/arrow-datafusion/issues/7118

   ### Describe the bug
   
   Panic: `index out of bounds: the len is 0 but the index is 0` in `first_value` / `last_value` when used as an aggregate
   
   ### To Reproduce
   
   ```sql
   create table foo (x int) as values (1), (2);
   select last_value(x) from foo;
   ```
   
   Result:
   
   ```shell
   (arrow_dev) alamb@MacBook-Pro-8:~/Software/influxdb_iox2$ datafusion-cli
   DataFusion CLI v28.0.0
   ❯ create table foo (x int) as values (1), (2);
   0 rows in set. Query took 0.003 seconds.
   ❯ select last_value(x) from foo;
   thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/aggregate/first_last.rs:374:13
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ```
   
   These other queries panic:
   
   ```
   0 rows in set. Query took 0.003 seconds.
   ❯ select last_value(x) from foo GROUP BY x;
   thread 'thread 'tokio-runtime-workertokio-runtime-worker' panicked at '' panicked at 'index out of bounds: the len is 0 but the index is 0index out of bounds: the len is 0 but the index is 0', ', /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/aggregate/first_last.rs/Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/aggregate/first_last.rs::374374::1313
   
   
   ❯ select first_value(x) from foo GROUP BY x;
   thread 'thread 'tokio-runtime-workertokio-runtime-worker' panicked at '' panicked at 'index out of bounds: the len is 0 but the index is 0index out of bounds: the len is 0 but the index is 0', ', /Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/aggregate/first_last.rs/Users/alamb/Software/arrow-datafusion/datafusion/physical-expr/src/aggregate/first_last.rs:189::13189
   :note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ```
   
   ### Expected behavior
   
   query should run successfully
   
   ### Additional context
   
   _No response_


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] mustafasrepo commented on issue #7118: Panic: `index out of bounds: the len is 0 but the index is 0` in `first_value` / `last_value` when used as an aggregate

Posted by "mustafasrepo (via GitHub)" <gi...@apache.org>.
mustafasrepo commented on issue #7118:
URL: https://github.com/apache/arrow-datafusion/issues/7118#issuecomment-1655130004

   I will try to solve this bug. Thanks @alamb .


-- 
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


[GitHub] [arrow-datafusion] alamb closed issue #7118: Panic: `index out of bounds: the len is 0 but the index is 0` in `first_value` / `last_value` when used as an aggregate

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #7118: Panic: `index out of bounds: the len is 0 but the index is 0` in `first_value` / `last_value` when used as an aggregate
URL: https://github.com/apache/arrow-datafusion/issues/7118


-- 
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