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

feat(query): support mul fro interval type with int types #17684

Merged
merged 2 commits into from
Apr 2, 2025

Conversation

sundy-li
Copy link
Member

@sundy-li sundy-li commented Apr 1, 2025

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

Summary

  1. Support interval multiply int type and interval expression
select interval  (number::string) month  a , a * 3, -3 * a  from numbers(4) where number > 0;
  1. Support cast expr as real/numeric syntax
select to_uint64(1024954.98046875::double) a, a::numeric, a::real
  1. Support extract iosyear
select to_date('1919-04-13','%Y-%m-%d') d,  to_year(d), to_iso_year(d), EXTRACT(YEAR from d),  EXTRACT(ISOYEAR from d);
----
1919-04-13 1919 1919 1919 1919

fixes #17677

Tests

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

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

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Apr 1, 2025
@sundy-li sundy-li marked this pull request as ready for review April 2, 2025 01:23
@sundy-li sundy-li requested a review from TCeason April 2, 2025 01:23
@sundy-li sundy-li merged commit 6308c81 into databendlabs:main Apr 2, 2025
280 of 295 checks passed
@sundy-li sundy-li deleted the interval-mul branch April 2, 2025 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-feature this PR introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: missing functions for tableau integration
2 participants