You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/02 14:44:05 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #4084: Improve FieldNotFound errors

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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes https://github.com/apache/arrow-datafusion/issues/4083
   
   # Rationale for this change
   
   It is confusing to get an error saying that field `'t1.c0'` does not exist but then states that field `'t1.c0`' is available. This happens when the qualifier is part of the field name and not in the qualifier field.
   
   ## Before
   
   ```
   No field named 't1.c0'. Valid fields are 't1.c0', ...
   ```
   
   ## After
   
   ```
   No field named 't1.c0'. Valid fields are 't1'.'c0', ...
   ```
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   <!--
   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 commented on a diff in pull request #4084: Improve FieldNotFound errors

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #4084:
URL: https://github.com/apache/arrow-datafusion/pull/4084#discussion_r1011996812


##########
datafusion/common/src/dfschema.rs:
##########
@@ -596,6 +596,18 @@ mod tests {
     use arrow::datatypes::DataType;
     use std::collections::BTreeMap;
 
+    #[test]
+    fn qualifier_in_name() -> Result<()> {
+        let schema = DFSchema::try_from_qualified_schema("t1", &test_schema_1())?;
+        // lookup with unqualified name "t1.c0"
+        let err = schema.index_of_column_by_name(None, "t1.c0").err().unwrap();
+        assert_eq!(
+            "Schema error: No field named 't1.c0'. Valid fields are 't1'.'c0', 't1'.'c1'.",

Review Comment:
   looks a lot better to me 👍 



-- 
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] andygrove merged pull request #4084: Improve FieldNotFound errors

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #4084:
URL: https://github.com/apache/arrow-datafusion/pull/4084


-- 
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] ursabot commented on pull request #4084: Improve FieldNotFound errors

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #4084:
URL: https://github.com/apache/arrow-datafusion/pull/4084#issuecomment-1300990443

   Benchmark runs are scheduled for baseline = 1a5f6ab399259513109a0a6d74c412f912c5b20c and contender = 8cd6129cf244a058cc5767c34da3dcd0a393e62e. 8cd6129cf244a058cc5767c34da3dcd0a393e62e is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/870298e670114bcaa4e28b9cf5d335df...121dd48282174b9790dc3c36b668ae6e/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/44ed687705f34ba3ba94e8e2cbb40bd3...2eb5b4af476449b3b1e444828c5b2338/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/0f015b4d846f4a9b8a70685affa60621...5b81752fb8eb4a19918c32c40f92c401/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/420cabb74302413a8626f69cea84bff1...d4353a7b12294c4fb5cbef5cd11fe363/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


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