You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/05/15 19:32:22 UTC
[I] panic: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Dandandan opened a new issue, #22224:
URL: https://github.com/apache/datafusion/issues/22224
### Describe the bug
Planning an `INSERT ... VALUES` statement with placeholder `$0` panics. Other statement forms reject `$0`, but this DML path parses the placeholder index as `usize` and subtracts one without checking for zero.
### To Reproduce
```sql
CREATE TABLE t AS SELECT 1 AS x;
EXPLAIN INSERT INTO t VALUES ($0);
```
### Actual behavior
```text
thread 'main' panicked at datafusion/sql/src/statement.rs:2339:29:
attempt to subtract with overflow
```
### Expected behavior
Return a planning error such as `Invalid placeholder, zero is not a valid index: $0`.
### Notes
`SELECT $0` and `PREPARE p AS SELECT $0` already return a clean planning error; the `INSERT ... VALUES` inference path should do the same.
--
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: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Posted by "Sean-Kenneth-Doherty (via GitHub)" <gi...@apache.org>.
Sean-Kenneth-Doherty commented on issue #22224:
URL: https://github.com/apache/datafusion/issues/22224#issuecomment-4469697494
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: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on issue #22224:
URL: https://github.com/apache/datafusion/issues/22224#issuecomment-4463239535
The earlier once where from setting up https://github.com/rust-fuzz/cargo-fuzz and have it generate random inputs while parsing / planning.
--
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: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #22224: panic: INSERT VALUES placeholder $0 underflows parameter index inference
URL: https://github.com/apache/datafusion/issues/22224
--
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: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on issue #22224:
URL: https://github.com/apache/datafusion/issues/22224#issuecomment-4463230405
> [@Dandandan](https://github.com/Dandandan) Are these issues found from fuzzing? Could you link that if so please?
This one was from instructing Codex to find distinct query crashes using
`/goal` and then something like "find 20 unique crashes in sql / planner. Continue until you found 20 distinct issues and create a github issue with a minimal reproducer for each"
--
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: INSERT VALUES placeholder $0 underflows parameter index inference [datafusion]
Posted by "nathanb9 (via GitHub)" <gi...@apache.org>.
nathanb9 commented on issue #22224:
URL: https://github.com/apache/datafusion/issues/22224#issuecomment-4463063682
@Dandandan Are these issues found from fuzzing? Could you link that if so please?
--
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