-
Notifications
You must be signed in to change notification settings - Fork 715
fix: use chrono apis to validate time #9422
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
Conversation
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR fixes date validation in the WAL directory datetime filter by replacing manual leap year calculation with chrono's
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant search_parquet
participant get_file_list
participant create_wal_dir_datetime_filter
participant scan_files_filtered
participant chrono
Client->>search_parquet: Query with time_range
search_parquet->>get_file_list: Get files in time range
get_file_list->>create_wal_dir_datetime_filter: Create filter(start_time, end_time)
create_wal_dir_datetime_filter-->>get_file_list: Return filter closure
get_file_list->>scan_files_filtered: Scan with filter
loop For each path
scan_files_filtered->>create_wal_dir_datetime_filter: Apply filter(path)
create_wal_dir_datetime_filter->>chrono: with_ymd_and_hms(year, month, day, hour)
chrono-->>create_wal_dir_datetime_filter: Valid datetime or None
create_wal_dir_datetime_filter-->>scan_files_filtered: true/false
end
scan_files_filtered-->>get_file_list: Filtered file list
get_file_list-->>search_parquet: FileKey list
search_parquet-->>Client: Search results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
Simplifies the wal reader filters and add tests cases