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

[GitHub] [arrow-datafusion] kawadakk opened a new pull request, #5787: Return an error for invalid placeholder `$0` instead of panicking

kawadakk opened a new pull request, #5787:
URL: https://github.com/apache/arrow-datafusion/pull/5787

   # Which issue does this PR close?
   
   Closes #5786.
   
   # Rationale for this change
   
   Fixing a bug.
   
   # What changes are included in this PR?
   
   Updates `SqlToRel::create_placeholder_expr` to handle the case where `index == Ok(0)` by returning an `Err(_)` value with an appropriate error description.
   
   # Are these changes tested?
   
   This PR adds a test case `test_prepare_statement_to_plan_panic_param_zero` (based on `test_prepare_statement_to_plan_panic_param_format`) to check this case.
   
   https://github.com/apache/arrow-datafusion/blob/ed8f914d5621adccbcfc375c865036a37efdbcc1/datafusion/sql/tests/integration_test.rs#L3337-L3346
   
   # Are there any user-facing changes?
   
   The invalid placeholder will now cause `SessionState::statement_to_plan` to fail gracefully instead of panicking (if overflow checks are enabled) or interpreting it as `$18446744073709551616` (otherwise).
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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 merged pull request #5787: Return an error for invalid placeholder `$0` instead of panicking

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #5787:
URL: https://github.com/apache/arrow-datafusion/pull/5787


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