Skip to content

feat(query): Introducing Decimal64 #18010

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

Merged
merged 21 commits into from
Jun 4, 2025
Merged

Conversation

forsaken628
Copy link
Collaborator

@forsaken628 forsaken628 commented May 27, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

  • Introducing decimal64
  • Decimal division return type would have more appropriate precision (break change)
  • Will try to use decimal64 in the intermediate steps of decimal function arithmetic and function cast multistep calculations
  • Decimal in filters will always try to use decimal64
  • The current optimization scenario is quite limited and needs more work

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Benchmark

dataset: tpch sf100

version:

after: v1.2.745-nightly-025f87b87d
before: v1.2.745-nightly-4957bb4d8e

cast 1:
sql:

select count(*) from lineitem where l_quantity + l_quantity +l_quantity > 50;

duration: after: 1.742 sec (0.76) vs before: 2.283 sec

case 2:
sql:

select count(*) from lineitem where l_quantity + l_quantity *2 > 50;

duration: after: 1.744 sec (0.72) vs before: 2.470 sec

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
x
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label May 27, 2025
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
Signed-off-by: coldWater <[email protected]>
@forsaken628 forsaken628 added the ci-benchmark Benchmark: run all test label May 29, 2025
Copy link
Contributor

Docker Image for PR

  • tag: pr-18010-6a493ed-1748529954

note: this image tag is only available for internal use.

@forsaken628 forsaken628 added ci-benchmark Benchmark: run all test and removed ci-benchmark Benchmark: run all test labels May 30, 2025
Copy link
Contributor

Docker Image for PR

  • tag: pr-18010-dcfe28b-1748626354

note: this image tag is only available for internal use.

@forsaken628 forsaken628 added ci-benchmark Benchmark: run all test and removed ci-benchmark Benchmark: run all test labels Jun 3, 2025
Copy link
Contributor

github-actions bot commented Jun 3, 2025

Docker Image for PR

  • tag: pr-18010-bd893b5-1748948756

note: this image tag is only available for internal use.

@forsaken628 forsaken628 changed the title feat(query): Decimal64 feat(query): Introducing Decimal64 Jun 4, 2025
@forsaken628 forsaken628 marked this pull request as ready for review June 4, 2025 05:55
@forsaken628 forsaken628 requested a review from sundy-li June 4, 2025 05:55
@forsaken628 forsaken628 merged commit d2b613f into databendlabs:main Jun 4, 2025
81 checks passed
@forsaken628 forsaken628 deleted the decimal branch June 4, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-benchmark Benchmark: run all test pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants