Skip to content

[Python][C++] Exception ignored in: 'pyarrow._substrait._create_named_table_provider' #14766

Open

Description

@milesgranger

Describe the bug, including details regarding any error messages, version, and platform.

test_named_table_invalid_table_name generates a PytestUnraisableExceptionWarning in the tests. The exception itself is:

Traceback (most recent call last):
File "/home/joris/scipy/repos/arrow/python/pyarrow/tests/test_substrait.py", line 238, in table_provider
raise Exception("Unrecognized table name")
Exception: Unrecognized table name

The exception ought to be raised properly instead of 'hidden' as a warning.

Component(s)

Python

Activity

  1. milesgranger commented on Nov 29, 2022

    @milesgranger
    ContributorAuthor

    To expand, it appears the exception in the table_provider is raised in executor->Init then further down into engine::substrait::serde::DeserializePlans.

    But while it seems to raise the ArrowInvalid properly, somewhere it should probably clear the Python exception raised by the table_provider; or better still, use/append the first exception's message as the ArrowInvalid message?

  2. vibhatha commented on Dec 1, 2022

    @vibhatha
    Contributor

    @milesgranger this has been bothering me too. I wasn't quite sure the best way to resolve this at that time. Thanks for raising this. I will look into this. Are you planning to work on this?

  3. milesgranger commented on Dec 1, 2022

    @milesgranger
    ContributorAuthor

    Great! Not planning on it, at least not in the near feature. 👍

  4. vibhatha commented on Dec 1, 2022

    @vibhatha
    Contributor

    Okay, I will take a look at this. @pitrou or @jorisvandenbossche could you assign this to me?

  5. kou commented on Dec 1, 2022

    @kou
    Member

    Assigned.

  6. vibhatha commented on Dec 1, 2022

    @vibhatha
    Contributor

    Thank you @kou

  7. jorisvandenbossche commented on Dec 1, 2022

    @jorisvandenbossche
    Member

    My first guess would be that the _create_named_table_provider is missing an except *: (to indicate to cython that this function can raise errors, and thus that it should check if any error is raised). See https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#error-return-values

  8. vibhatha commented on Dec 1, 2022

    @vibhatha
    Contributor

    @jorisvandenbossche thanks for the idea. I will check this.

  9. removed their assignment
    on Jun 2, 2024
  10. vibhatha commented on Jun 2, 2024

    @vibhatha
    Contributor

    I am removing my assignment, since I am mostly maintaining Arrow Java.

  11. thisisnic commented on Nov 17, 2026

    @thisisnic
    Member

    See #37235 (comment) for another possible solution

  12. added
    Status: confirmed
    on Nov 17, 2026
  13. changed the title [-][Python] Fix PytestUnraisableExceptionWarning in substrait test[/-] [+][Python][C++] Exception ignored in: 'pyarrow._substrait._create_named_table_provider'[/+] on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: C++Component: PythonStatus: confirmedType: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions