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

Feature/Table valued functions #163

Merged
merged 14 commits into from
Nov 20, 2023
Merged

Feature/Table valued functions #163

merged 14 commits into from
Nov 20, 2023

Conversation

ingarabr
Copy link
Contributor

@ingarabr ingarabr commented Sep 14, 2023

Docs: https://cloud.google.com/bigquery/docs/table-functions

This is a breaking change because we have moved UDF under Routine. I think that's a reasonable thing to do since it aligns the concepts up with how google has defined them. For instance we reuse the syntax for BQSqlFrag.Call and the syntax for calling the routines.

@ingarabr ingarabr changed the title Feature/tvf Feature/Table valued functions Sep 14, 2023
@ingarabr ingarabr force-pushed the feature/tvf branch 3 times, most recently from 6ab8b55 to 81b6083 Compare November 8, 2023 14:07
@ingarabr ingarabr marked this pull request as ready for review November 8, 2023 14:09
@ingarabr ingarabr force-pushed the feature/tvf branch 3 times, most recently from 48a6946 to be7e6fe Compare November 14, 2023 12:39
@ingarabr ingarabr force-pushed the feature/tvf branch 3 times, most recently from b5e1bbe to d2b723d Compare November 15, 2023 09:51
eirikhalvard and others added 8 commits November 20, 2023 09:23
moved Params from UDF to Routines for readability
- added table value functions (tvf)
- udf and tvf are both routines, so they are consolidated under the same
  concept, `Routine`
The check is a bit different from table and views. It has to verify that the schema
matches and the params. The schema tests is done through a CTE and the parameters
through a UDF that always return true. The query CTE body needs to include a reference
to both of them.
Done the dame way as other fragments however we define the tvf parameters at the
top of the fragment.
@ingarabr ingarabr merged commit 89ccbf8 into main Nov 20, 2023
11 checks passed
@ingarabr ingarabr deleted the feature/tvf branch November 20, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants