Skip to content

Conversation

@iajoiner
Copy link
Contributor

@iajoiner iajoiner commented Sep 2, 2022

Which issue does this PR close?

Closes #3312.

Rationale for this change

Replace panics with mostly Results.

What changes are included in this PR?

Are there any user-facing changes?

No

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Sep 2, 2022
@iajoiner
Copy link
Contributor Author

iajoiner commented Sep 2, 2022

@andygrove Please review. Note that the unreachable!s have been replaced with None following what other private coercing functions do.

@iajoiner
Copy link
Contributor Author

iajoiner commented Sep 2, 2022

The Mac test probably needs to be rerun.

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Merging #3341 (cc69cde) into master (7c04964) will decrease coverage by 0.00%.
The diff coverage is 68.00%.

@@            Coverage Diff             @@
##           master    #3341      +/-   ##
==========================================
- Coverage   85.59%   85.58%   -0.01%     
==========================================
  Files         296      296              
  Lines       54214    54220       +6     
==========================================
+ Hits        46403    46404       +1     
- Misses       7811     7816       +5     
Impacted Files Coverage Δ
datafusion/expr/src/binary_rule.rs 84.50% <0.00%> (-0.48%) ⬇️
datafusion/expr/src/logical_plan/builder.rs 90.17% <70.00%> (-0.18%) ⬇️
datafusion/expr/src/logical_plan/display.rs 90.12% <75.00%> (-1.02%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 77.35% <75.00%> (-0.10%) ⬇️
datafusion/expr/src/expr_rewriter.rs 79.69% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alamb
Copy link
Contributor

alamb commented Sep 3, 2022

I restarted the mac test

if self.plan.schema().field_from_column(l).is_ok()
&& right.schema().field_from_column(r).is_ok()
&& can_hash(self.plan.schema().field_from_column(l).unwrap().data_type())
if right.schema().field_from_column(r).is_ok()
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it has changed the semantics of the code. Previously if field_from_column(l) was an Err then a different code path would have been followed and with this change, there would be an error instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see. Really thanks! Fixed!

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @iajoiner

@andygrove andygrove merged commit e6378f4 into apache:master Sep 8, 2022
@ursabot
Copy link

ursabot commented Sep 8, 2022

Benchmark runs are scheduled for baseline = 30fce22 and contender = e6378f4. e6378f4 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
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

@iajoiner iajoiner deleted the issue-3312 branch September 11, 2022 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review use of panic in datafusion-expr crate

6 participants