-
Notifications
You must be signed in to change notification settings - Fork 1.8k
bugfix: Invalid QuestDB timestamp floor year unit #7474
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
base: master
Are you sure you want to change the base?
bugfix: Invalid QuestDB timestamp floor year unit #7474
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 8 Ignored Deployments
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7474 +/- ##
=======================================
Coverage 48.02% 48.02%
=======================================
Files 155 155
Lines 20868 20868
Branches 5370 5370
=======================================
Hits 10021 10021
Misses 10101 10101
Partials 746 746
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@peterklingelhofer Thanks for contributing! Could you please add a test for it? |
Added base and base snake case GraphQL queries to test for this: a3238ad |
@paveltiunov not sure if the tests are just broken with respect to testing year (I noticed there were no year tests before I added this one) or if it's my change. Regardless, adding a GraphQL query to test is not specifically testing the QuestDB driver from what I can tell. Unfortunately I don't have enough time to dig further - I can close this out and simply create an issue linking to this MR for context. It's not really that big of a deal, if you want data for "This year" it's probably not that hard to figure out what year this year is, and I don't need to for my use-case, just was a bug I noticed in passing that I figured I'd make a quick attempt on. |
@peterklingelhofer I guess snapshots weren't updated. |
Check List
Issue Reference this PR resolves
When aggregating data on the year level, we see this error in QuestDB in the generated SQL:
invalid unit 'Y'
Description of Changes Made (if issue reference is not provided)
As you can see in the QuestDB documentation,
Y
is not a valid option.Adjusting to use the lowercase
y
yields results as expected:Note: This only seems to be a problem if we try to grab
timestamp__year
in the GraphQL query.Yields the above
invalid unit 'Y'
error.Whereas this query works fine: