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

chore: adjust fuse_time_travel_size() #16995

Merged

Conversation

SkyFan2002
Copy link
Member

@SkyFan2002 SkyFan2002 commented Dec 4, 2024

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

Summary

If an error occurs when reading the latest snapshot, the function will continue execution instead of stopping. And the error will be recorded in the result set.

For example:

root@localhost:8000/default> select * from fuse_time_travel_size('test_fuse_time_travel_size');

SELECT * FROM fuse_time_travel_size('test_fuse_time_travel_size')

┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│        database_name       │ table_name │ time_travel_size │ latest_snapshot_size │                                                                                                                     error                                                                                                                    │
│           String           │   String   │      UInt64      │   Nullable(UInt64)   │                                                                                                               Nullable(String)                                                                                                               │
├────────────────────────────┼────────────┼──────────────────┼──────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ test_fuse_time_travel_size │ t          │                0 │                 NULL │ StorageNotFound. Code: 3001, Text = NotFound (persistent) at read, context: { service: fs, path: 116848/116855/_ss/f28e516bda394d8ca3b6efea1007e362_v4.mpk, range: 0- } => entity not found, source: No such file or directory (os error 2). │
│ test_fuse_time_travel_size │ t2         │                0 │                    0 │ NULL                                                                                                                                                                                                                                         │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
2 rows read in 0.029 sec. Processed 2 rows, 394 B (68.97 rows/s, 13.27 KiB/s)

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-chore this PR only has small changes that no need to record, like coding styles. label Dec 4, 2024
@SkyFan2002 SkyFan2002 requested a review from dantengsky December 4, 2024 07:15
@SkyFan2002
Copy link
Member Author

@soyeric128 Please add doc. Previous PR: #16698

@dantengsky dantengsky added this pull request to the merge queue Dec 4, 2024
Merged via the queue into databendlabs:main with commit 6ede5a6 Dec 4, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chore this PR only has small changes that no need to record, like coding styles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants