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

[Data] add data type u16 #844

Merged
merged 47 commits into from
Oct 29, 2022
Merged

Conversation

ChobobDev
Copy link
Contributor

@ChobobDev ChobobDev commented Sep 14, 2022

Background

from #623

ref
add data type u8

Description

  • When calculating arithmetic operations on u16 and i16, both are converted to i64 and calculated.
  • For the remaining types, cast to the larger type.

Rules

  1. cast right-hand element into left-hand element type in case of arithmetics between INTEGER types
  2. in case of INTEGER * FLOAT convert to FLOAT
  3. in case of INTEGER * DECIMAL convert to DECIMAL
  4. in case of FLOAT * DECIMAL convert to FLOAT

@coveralls
Copy link

coveralls commented Sep 14, 2022

Pull Request Test Coverage Report for Build 3350333081

  • 833 of 837 (99.52%) changed or added relevant lines in 20 files are covered.
  • 23 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 97.937%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/data/key.rs 15 16 93.75%
core/src/data/value/convert.rs 95 96 98.96%
core/src/data/value/mod.rs 64 66 96.97%
Files with Coverage Reduction New Missed Lines %
core/src/executor/context/filter_context.rs 4 93.44%
test-suite/src/tester/mod.rs 19 87.5%
Totals Coverage Status
Change from base Build 3349913767: 0.04%
Covered Lines: 39269
Relevant Lines: 40096

💛 - Coveralls

@ever0de ever0de added the enhancement New feature or request label Sep 15, 2022
@ChobobDev ChobobDev marked this pull request as ready for review September 17, 2022 19:18
@ChobobDev ChobobDev force-pushed the feature/data_type_u16 branch from 529ed2c to 78bacee Compare October 14, 2022 03:43
Copy link
Member

@panarch panarch left a comment

Choose a reason for hiding this comment

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

Awesome 👍 👍
All looks nice!
Thanks for the contribution! New numeric type has come :D

@panarch panarch merged commit 823e8e8 into gluesql:main Oct 29, 2022
@ChobobDev ChobobDev deleted the feature/data_type_u16 branch November 5, 2022 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants