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/09/14 20:07:10 UTC

[GitHub] [arrow-datafusion] kmitchener opened a new pull request, #3488: change SQL numeric literals from float to decimal

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

   # 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 #3394.
   
    # 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.  
   -->
   
   This introduces Decimal type in place of Float for numeric SQL literals.
   
   # 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.
   -->
   
   This PR:
   * makes the change to Decimal128 from Float64
   * consolidates the logic for converting the number string we get from the parser to Int64 or Decima128 types
   * it also comments out tests that fail due to related bugs in the epic #3480
   
   # 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] Jimexist commented on pull request #3488: change SQL numeric literals from float to decimal

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

   i think this change to UX is a bit too big. can we actually allow some of these functions to auto-convert from decimal to double or vice versa? i don't think asking existing queries to annotate `::double` is helpful for adoption in the long term


-- 
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] codecov-commenter commented on pull request #3488: change SQL numeric literals from float to decimal

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3488:
URL: https://github.com/apache/arrow-datafusion/pull/3488#issuecomment-1247281251

   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/3488?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3488](https://codecov.io/gh/apache/arrow-datafusion/pull/3488?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a700e7a) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/9d028b3ac3e1d9e702af088a7620826c58f3c115?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d028b3) will **decrease** coverage by `0.04%`.
   > The diff coverage is `93.18%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #3488      +/-   ##
   ==========================================
   - Coverage   85.75%   85.70%   -0.05%     
   ==========================================
     Files         299      299              
     Lines       55282    55227      -55     
   ==========================================
   - Hits        47409    47335      -74     
   - Misses       7873     7892      +19     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/3488?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [datafusion/core/tests/parquet\_pruning.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3BhcnF1ZXRfcHJ1bmluZy5ycw==) | `99.43% <ø> (ø)` | |
   | [datafusion/core/tests/sql/decimal.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9kZWNpbWFsLnJz) | `100.00% <ø> (ø)` | |
   | [datafusion/core/tests/sql/expr.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9leHByLnJz) | `99.86% <ø> (-0.01%)` | :arrow_down: |
   | [datafusion/core/tests/sql/select.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9zZWxlY3QucnM=) | `99.78% <ø> (ø)` | |
   | [datafusion/core/tests/sql/subqueries.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9zdWJxdWVyaWVzLnJz) | `94.95% <ø> (ø)` | |
   | [datafusion/sql/src/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9zcWwvc3JjL3BsYW5uZXIucnM=) | `81.12% <90.00%> (+0.17%)` | :arrow_up: |
   | [datafusion/core/tests/sql/aggregates.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9hZ2dyZWdhdGVzLnJz) | `99.35% <100.00%> (-0.03%)` | :arrow_down: |
   | [datafusion/core/tests/sql/arrow\_typeof.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3Rlc3RzL3NxbC9hcnJvd190eXBlb2YucnM=) | `100.00% <100.00%> (ø)` | |
   | [...sical-expr/src/aggregate/approx\_percentile\_cont.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1leHByL3NyYy9hZ2dyZWdhdGUvYXBwcm94X3BlcmNlbnRpbGVfY29udC5ycw==) | `69.64% <0.00%> (-11.91%)` | :arrow_down: |
   | [datafusion/expr/src/binary\_rule.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9iaW5hcnlfcnVsZS5ycw==) | `84.03% <0.00%> (-0.57%)` | :arrow_down: |
   | ... and [6 more](https://codecov.io/gh/apache/arrow-datafusion/pull/3488/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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 #3488: change SQL numeric literals from float to decimal

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

   > I want to highlight that I've entered issues (tracked in https://github.com/apache/arrow-datafusion/issues/3480) and commented out tests for some things that broke when using Decimal128. It does feel a bit like Decimal128 has some maturing to do to match the quality of the other numeric datatypes. But I wanted to submit this PR anyway
   
   THanks @kmitchener 
   
   I wonder if we can perhaps mark this PR as a draft as we work through whatever other maturing Decimal needs so that we don't require `::double`. I agree with @Jimexist  that that seems like a step backwards in functionality


-- 
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] kmitchener commented on pull request #3488: change SQL numeric literals from float to decimal

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

   Sure, I will switch it to draft and add another issue for changing the mathematical functions to accept and return decimal types in addition to float, where appropriate. That should reduce the amount of casting needed.


-- 
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] kmitchener commented on pull request #3488: change SQL numeric literals from float to decimal

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

   I want to highlight that I've entered issues (tracked in #3480) and commented out tests for some things that broke when using Decimal128. It does feel a bit like Decimal128 has some maturing to do to match the quality of the other numeric datatypes. But I wanted to submit this PR anyway -- if we're committed to making the change to decimal type in this way, then getting it in master is a good way to get additional eyes (and bigger brains than mine) on it.
   


-- 
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 #3488: change SQL numeric literals from float to decimal

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

   Thanks @kmitchener 


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


Re: [PR] change SQL numeric literals from float to decimal [arrow-datafusion]

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

   Closing as this PR is over a year old. Please feel free to reopen it / rebase it if you plan to keep working on it


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


Re: [PR] change SQL numeric literals from float to decimal [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed pull request #3488: change SQL numeric literals from float to decimal
URL: https://github.com/apache/arrow-datafusion/pull/3488


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