Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: make sql number parsing slightly more efficient + functional #3432

Merged
merged 1 commit into from
Sep 10, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Sep 10, 2022

Which issue does this PR close?

Related to #3397

Rationale for this change

I was inspired by @andygrove 's comment in #3397 (comment) to see if I could make the number parsing code better. I played around with it and figured I would propose it as a small follow on PR rather than making the original PR bigger.

What changes are included in this PR?

  1. Rewrite numeric parsing to use a more functional style (and only try to parse as f64 if parsing as i64 fails)

Are there any user-facing changes?

No

@github-actions github-actions bot added the sql SQL Planner label Sep 10, 2022
@alamb alamb changed the title minor: make parsing slightly more efficient + functional minor: make sql number parsing slightly more efficient + functional Sep 10, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #3432 (12eedb0) into master (8b59b20) will decrease coverage by 0.00%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master    #3432      +/-   ##
==========================================
- Coverage   85.64%   85.63%   -0.01%     
==========================================
  Files         296      296              
  Lines       54464    54469       +5     
==========================================
+ Hits        46643    46644       +1     
- Misses       7821     7825       +4     
Impacted Files Coverage Δ
datafusion/sql/src/planner.rs 80.92% <60.00%> (-0.15%) ⬇️

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

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

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

👍

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.

Nice!

@andygrove andygrove merged commit b247204 into apache:master Sep 10, 2022
@ursabot
Copy link

ursabot commented Sep 10, 2022

Benchmark runs are scheduled for baseline = e14d090 and contender = b247204. b247204 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

@alamb alamb deleted the alamb/more_functional branch September 11, 2022 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants