Skip to content

External Error prefix is repeated multiple times #14080

Closed

Description

@gz

Describe the bug

I'm getting errors in the form of DataFusionError::External(External(External(External(External(External(xyz)))) when throwing them from https://docs.rs/datafusion/latest/datafusion/physical_plan/trait.ExecutionPlan.html#tymethod.execute

To Reproduce

Implement a TableProvider that throws an error and call it

    fn execute(
        &self,
        partition: usize,
        _context: Arc<TaskContext>,
    ) -> datafusion::common::Result<SendableRecordBatchStream> {
            return Err(DataFusionError::Execution(
                format!("error"),
            ));
    }

Expected behavior

I'd expect the External(External(External(External(External flattened to just one External

Additional context

Activity

  1. added
    bugSomething isn't working
    on Jan 10, 2025
  2. added a commit that references this issue on Jan 10, 2025
  3. Omega359 commented on Jan 11, 2025

    @Omega359
    Contributor

    I was seeing this with the sqlite tests, thx for creating a ticket for it.

  4. alamb commented on Jan 13, 2025

    @alamb
    Contributor

    I agree this would be nice to fix.

    We can potentially do the unwrapping in this From impl:

    impl From<GenericError> for DataFusionError {
    fn from(err: GenericError) -> Self {
    DataFusionError::External(err)
    }
    }

    But not sure if there are other places too

  5. getChan commented on Jan 29, 2025

    @getChan
    Contributor

    Take

  6. Omega359 commented on Jan 29, 2025

    @Omega359
    Contributor

    Note that when this is fixed the sqlite test files will need to be regenerated. See #14290 for a PR to do that.

  7. getChan commented on Jan 31, 2025

    @getChan
    Contributor

    @Omega359 @gz
    Can you provide me with code that can reproduce a bug? I want to use it for testing.

  8. alamb commented on Jan 31, 2025

    @alamb
    Contributor

    @Omega359 @gz Can you provide me with code that can reproduce a bug? I want to use it for testing.

    I think the tests @Omega359 is referring to are the ones in

    The challenge is updating the expected results

  9. Omega359 commented on Jan 31, 2025

    @Omega359
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions