-
-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
Milestone
Description
Hello I'm using some of the Raw Expressions to use custom functions of postgres that aren't mapped in gojet yet, such as percentile_disc
and within group
, I'm running into limitation of using the Raw format, where I have within group
in raw, but it needs to contain a standard ORDER BY
clause inside it, there's no way for me to substitute the jet.ORDER_BY window into the Raw string via RawArgs, could that be enabled as a feature?
would look something like:
args := jet.RawArgs {
"PERCENTILE": percentile,
"ORDER_BY": jet.ORDER_BY(table.MyTable.MyCol1.DIV(table.MyTable.MyCol2))}
projection := jet.CAST(jet.CEIL(jet.RawFloat("percentile_disc(0.:PERCENTILE) WITHIN GROUP (:ORDER_BY)", args))).AS_BIGINT().AS("MyProjectedColumn")
Otherwise, have to resort to hardcoding the full raw snippet including the ORDER BY clause and its table/column references, which defeats the purpose of using the lib. Is it possible to achieve this any other ways?