jOOQ / jOOQ

jOOQ is the best way to write SQL in Java
https://www.jooq.org
Other
6.09k stars 1.2k forks source link

Add support for a SPLIT table valued function #11457

Open lukaseder opened 3 years ago

lukaseder commented 3 years ago

BigQuery supports SPLIT(), which splits a string to an array: https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#split

PostgreSQL has a similar function called regexp_split_to_array. We could support a table valued function that splits a string into an array or table. The table version can probably be emulated in other dialects using recursive SQL.

Emulations:

mrclrchtr commented 1 month ago

I am trying to understand the following warning and have come across this issue. Does this have anything to do with it?

Ambiguous type name      : The database object public.regexp_matches generates a class de.mrclrchtr.holz.generated.persistence.entities.tables.RegexpMatchesTable (class org.jooq.meta.postgres.PostgresTableValuedFunction) which conflicts with the previously generated class de.mrclrchtr.holz.generated.persistence.entities.tables.RegexpMatchesTable (class org.jooq.meta.postgres.PostgresTableValuedFunction). Use a custom generator strategy to disambiguate the types. More information here:
 - https://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/
 - https://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy/
Ambiguous type name      : The database object public.regexp_split_to_table generates a class de.mrclrchtr.holz.generated.persistence.entities.tables.RegexpSplitToTableTable (class org.jooq.meta.postgres.PostgresTableValuedFunction) which conflicts with the previously generated class de.mrclrchtr.holz.generated.persistence.entities.tables.RegexpSplitToTableTable (class org.jooq.meta.postgres.PostgresTableValuedFunction). Use a custom generator strategy to disambiguate the types. More information here:
 - https://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/
 - https://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy/
lukaseder commented 1 month ago

Does this have anything to do with it?

No. Can you please create a new support request with more complete information?