jet
jet copied to clipboard
Add Postgres GENERATE_SERIES function
Adds GENERATE_SERIES function https://www.postgresql.org/docs/current/functions-srf.html I could also add the GENERATE_SUBSCRIPTS function but it has to wait for array expressions https://github.com/go-jet/jet/pull/380.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.49%. Comparing base (
6a0798e) to head (dfafd14). Report is 29 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #397 +/- ##
=======================================
Coverage 90.49% 90.49%
=======================================
Files 125 125
Lines 7458 7463 +5
=======================================
+ Hits 6749 6754 +5
Misses 550 550
Partials 159 159
| Flag | Coverage Δ | |
|---|---|---|
90.49% <100.00%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Note that generate_series can be used as table source and expression:
SELECT *
FROM generate_series(2,4); -- table source
SELECT generate_series(2,4); -- expression
With this PR the expression use case would be supported, but not the table source. Now to support table source it is a bit more work. I'm wondering if is it worth supporting the table source at all. At least to my knowledge everything that can be done with generate_series as a table source can be also done as an expression.
I guess we can go with just expression form, and revisit the other form if needed.