Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jun 29, 2021

Rationale for this change

I am working through errors while integrating the new qualified identifiers in DataFusion and a few things are confusing:

  1. What exactly normalize* was normalizing (I found the comments slightly vague)
  2. When I got an error (due to a problem I am debugging), it would have helped me debug the issue more to know what the valid fields were.

What changes are included in this PR?

Changes:

  1. Add some comments to Column::normalize and normalize_expr
  2. Print out the available schema in error message

Are there any user-facing changes?

Previously the error message looked like this

thread 'frontend::reorg::test::test_split_plan' panicked at 'called `Result::unwrap()` on an `Err` value: Plan("No field matches column \'#t.time\'")', query/src/frontend/reorg.rs:372:78

Now the error looks like:

thread 'frontend::reorg::test::test_split_plan' panicked at 'called `Result::unwrap()` on an `Err` value: Plan("No field matches column \'#t.time\'. Available fields: foo.field_int, foo.field_int2, foo.tag1, foo.time")', query/src/frontend/reorg.rs:373:78

Copy link
Member

@houqp houqp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alamb alamb merged commit 466b7c5 into apache:master Jun 30, 2021
@alamb alamb deleted the alamb/improve_errors_and_comments branch October 6, 2022 18:29
unkloud pushed a commit to unkloud/datafusion that referenced this pull request Mar 23, 2025
H0TB0X420 pushed a commit to H0TB0X420/datafusion that referenced this pull request Oct 7, 2025
* Expose unnest feature

* Update dataframe operation name to match rust implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants