BigQuery has an WITH OFFSET AS syntax as part of its UNNEST function. https://cloud.google.com/bigquery/docs/arrays#flattening_arrays I didn’t quickly see HoneySQL support for this. Should I open an issue?
FWIW it's very easy to extend HoneySQL to support whatever you want.
In this case, you can either use register-clause! to register :with-offset or register-fn! to register a custom formatter for :unnest. The latter makes sense if you consider WITH OFFSET to be a part of the UNNEST function and not of the overall query.
Thanks I tried register-fn! and discovered that I misread the BQ syntax diagram. The WITH OFFSET is actually a part of the FROM clause (from honey’s point of view) but it turns out that the syntax is only available if the you use the UNNEST function
I got distracted by something else before I to register a custom clause fn