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

Add Postgres GENERATE_SERIES function #397

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

BranislavLazic
Copy link
Contributor

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 #380.

@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@go-jet
Copy link
Owner

go-jet commented Oct 2, 2024

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.

@go-jet
Copy link
Owner

go-jet commented Oct 28, 2024

I guess we can go with just expression form, and revisit the other form if needed.

@go-jet go-jet merged commit bee431f into go-jet:master Oct 28, 2024
3 checks 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