alamb opened a new pull request #641:
URL: https://github.com/apache/arrow-datafusion/pull/641


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


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to