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

jira_issue_worklogs: use updated to get worklogs #151

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

mariusgrigaitis
Copy link
Contributor

@mariusgrigaitis mariusgrigaitis commented Feb 17, 2025

Example query results

Results
> select count(*) from jira_issue_worklog
+-------+
| count |
+-------+
| 1913  |
+-------+

Time: 15.7s. Rows returned: 0. Rows fetched: 1,913. Hydrate calls: 0.
> select count(*) from jira_issue_worklog where issue_id = '2261424';
+-------+
| count |
+-------+
| 1     |
+-------+

Time: 397ms. Rows returned: 0. Rows fetched: 1. Hydrate calls: 0.
> select count(*) from jira_issue_worklog where updated > '2025-01-01 00:00:00'::timestamptz;
+-------+
| count |
+-------+
| 313   |
+-------+

Time: 3.6s. Rows returned: 0. Rows fetched: 313. Hydrate calls: 0.

This PR improves the worklog retrieval functionality by filtering on the updated field, leading to more efficient queries such as:

select count(*) from jira_issue_worklog where updated > '2025-01-01 00:00:00'::timestamptz

Key changes include:

  • Efficient querying based on the updated field.
  • Removal of the ParentHydrate dependency from jira_issue_worklog.
  • Note: When an issue_id is not provided, the default filter (updated > 0) allows fetching all worklog entries.

This update may also make issue #148 redundant.

@ParthaI
Copy link
Contributor

ParthaI commented Feb 18, 2025

Thanks for raising the PR! It would be helpful to include observations in the PR body, such as query execution time, the number of API calls made, and results from different query parameter combinations.

Additionally, we haven't explicitly handled the </<= operators for the updated value in the WHERE clause. I'm curious to see how the table behaves in such scenarios. Looking forward to your insights! 🚀

@mariusgrigaitis
Copy link
Contributor Author

mariusgrigaitis commented Feb 18, 2025

Sample queries are actually in PR description (under collapsed section)

<=/< should still work by getting all records

@misraved misraved requested a review from ParthaI February 18, 2025 14:09
Copy link
Contributor

@ParthaI ParthaI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mingfang, I have left a few review comments. Please have a look when you get a chance, Thanks!

Copy link
Contributor

@ParthaI ParthaI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@misraved misraved merged commit a0d71db into turbot:main Feb 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants