You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ygf11 (via GitHub)" <gi...@apache.org> on 2023/02/15 09:43:15 UTC

[GitHub] [arrow-datafusion] ygf11 opened a new pull request, #5287: Fix the potential bug of check_all_column_from_schema

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

   # 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 #.
   
   # Rationale for this change
   
   <!--
    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.  
   -->
   
   The `check_all_column_from_schema` is used to check if columns are all in the schema, and it is based on `index_of_column`.
   
   Giving the column, `index_of_column` has three result:
   1. No such field, return FieldNotFound error.
   2. Find only one field, return this field.
   3. Find one more field, return Ambiguous reference error.
   
   `1` and `3` will return as Error. In the usage of `check_all_column_from_schema`, we need distinguish these two, but current we don't do it. This pr will fix this bug.
   
   # 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.
   -->
   
   * Refactor `index_of_column_by_name` to return `Result<Option<usize>>`.
   * Add `contain_column` function based on `index_of_column_by_name`, and `check_all_column_from_schema` will call it.
   
   # Are these changes tested?
   Yes
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # 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 pull request #5287: Fix the potential bug of check_all_column_from_schema

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #5287:
URL: https://github.com/apache/arrow-datafusion/pull/5287#issuecomment-1434672135

   > Perhaps more improvements can be made here in the future.
   > Some function used for find will return Result, it's a little strange, maybe we can use Result<Option<>> or Option<>
   
   I couldn't agree more 👍 
   
   As @ygf11  points out, a ticket I filed yesterday iI think suggests related work:  https://github.com/apache/arrow-datafusion/issues/5309


-- 
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 #5287: Fix the potential bug of check_all_column_from_schema

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #5287:
URL: https://github.com/apache/arrow-datafusion/pull/5287#issuecomment-1434681081

   Benchmark runs are scheduled for baseline = fed4019d556f4afb3156fd12c21608e08b8d7eb6 and contender = f154a9aa38e376de2cf7ac0df3618c28729f2f20. f154a9aa38e376de2cf7ac0df3618c28729f2f20 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/b8c35006f8e34575952b4958c4c1aa31...76fe23bc2b7e4a56aa09364a0ad6137f/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/638a943104f8421aa0cfd4425f971468...347547e7b8d740e6a90e5cf166b80f46/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/d0b2e5e4e71c4750a7c9cfc9b9204d21...9a11075f3ee44f97a76c7d247ea69563/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/283203c9aac2484dbd4dab8015bce53d...fbbd14d640874f13b479305ee49b3185/)
   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


[GitHub] [arrow-datafusion] alamb merged pull request #5287: Fix the potential bug of check_all_column_from_schema

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #5287:
URL: https://github.com/apache/arrow-datafusion/pull/5287


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