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

fix: allow type cast of Timestamptz in generated column #9580

Merged
merged 6 commits into from
May 5, 2023

Conversation

yuhao-su
Copy link
Contributor

@yuhao-su yuhao-su commented May 4, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

  • allow type cast of Timestamptz in generated column.

close #9552

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

The timezone in generated column

In cases where created generated columns expressions involved a cast that requires timezone (if not explicitly set with AT TIMEZONE):

  • When creating a table, the timezone used is the session timezone in the create table session.
  • When creating a source, the cast won't be performed. The session timezone in the create source session has no effect
  • When creating a MV on source with generated columns expressions involved the cast requires timezone, the timezone used will be the session timezone in the create MV session.

Release note

@yuhao-su yuhao-su requested review from BugenZhao and st1page May 4, 2023 09:26
@github-actions github-actions bot added the type/fix Bug fix label May 4, 2023
@codecov
Copy link

codecov bot commented May 4, 2023

Codecov Report

Merging #9580 (720f1f8) into main (078ce4f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #9580   +/-   ##
=======================================
  Coverage   70.73%   70.73%           
=======================================
  Files        1233     1233           
  Lines      206616   206623    +7     
=======================================
+ Hits       146148   146164   +16     
+ Misses      60468    60459    -9     
Flag Coverage Δ
rust 70.73% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/handler/create_mv.rs 95.39% <ø> (ø)
src/frontend/src/handler/create_table.rs 90.25% <100.00%> (+0.10%) ⬆️
src/frontend/src/optimizer/mod.rs 92.29% <100.00%> (ø)

... and 8 files with indirect coverage changes

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

@yuhao-su yuhao-su added the user-facing-changes Contains changes that are visible to users label May 5, 2023
@st1page st1page enabled auto-merge May 5, 2023 07:02
@st1page st1page added this pull request to the merge queue May 5, 2023
Merged via the queue into main with commit bc63c27 May 5, 2023
@st1page st1page deleted the yuhao/timestamptz_proc branch May 5, 2023 08:51
@CharlieSYH CharlieSYH added the 📖✓ Covered or will be covered in the user docs. label May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proctime() function is not working
3 participants