You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "2010YOUY01 (via GitHub)" <gi...@apache.org> on 2024/10/08 15:40:18 UTC

[I] Panic in `nth_value` window function (SQLancer) [datafusion]

2010YOUY01 opened a new issue, #12815:
URL: https://github.com/apache/datafusion/issues/12815

   ### Describe the bug
   
   See the reproducer in datafusion-cli (compiled from the latest main, commit https://github.com/apache/datafusion/commit/84c94097896e9d08e40d63e8c505414ea70e8b29)
   
   ```shell
   /*DML*/CREATE TABLE t41(v0 DOUBLE, v1 BOOLEAN, v2 STRING, v3 STRING);
   /*DML*/INSERT INTO t41(v0, v2) VALUES ('NaN'::Double, 'd殪s7'), (0.4097890978398071, '顼)j');
   
   > SELECT NTH_VALUE(tt0.v0, NULL) OVER (PARTITION BY tt0.v2 ORDER BY tt0.v0) FROM t41 AS tt0;
   thread 'main' panicked at /Users/yongting/Desktop/code/my_datafusion/arrow-datafusion/datafusion/physical-expr/src/window/nth_value.rs:195:63:
   attempt to subtract with overflow
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   
   ```
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   Returns 2 rows of `Null`
   Run in duckdb:
   ```shell
   D /*DML*/CREATE TABLE t41(v0 DOUBLE, v1 BOOLEAN, v2 STRING, v3 STRING);
   D /*DML*/INSERT INTO t41(v0, v2) VALUES ('NaN'::Double, 'd殪s7'), (0.4097890978398071, '顼)j');
   D SELECT NTH_VALUE(tt0.v0, NULL) OVER (PARTITION BY tt0.v2 ORDER BY tt0.v0) FROM t41 AS tt0;
   ┌────────────────────────────────────────────────────────────────────┐
   │ nth_value(tt0.v0, NULL) OVER (PARTITION BY tt0.v2 ORDER BY tt0.v0) │
   │                               double                               │
   ├────────────────────────────────────────────────────────────────────┤
   │                                                                    │
   │                                                                    │
   └────────────────────────────────────────────────────────────────────┘
   ```
   
   ### Additional context
   
   Found by SQLancer https://github.com/apache/datafusion/issues/11030


-- 
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] Panic in `nth_value` window function (SQLancer) [datafusion]

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

   take


-- 
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] Panic in `nth_value` window function (SQLancer) [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #12815: Panic in `nth_value` window function (SQLancer)
URL: https://github.com/apache/datafusion/issues/12815


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