MAX_BY is not supported
What would you like to be added?
Hi,
Thanks for maintaining this awesome library.
I tried using it, but MAX_BY function hasn't been supported yet.
It would be helpful if you could implement this function as well.
Or is this issue related to go-zetasql ?
Hi, last I checked it was not supported by google/zetasql.
MAX_BY and MIN_BY functions are synonymous with ANY_VALUE(x HAVING MAX y) or ANY_VALUE(x HAVING MIN y), you can use those as a workaround.
It'd be possible to register these functions in the goccy/go-zetasqlite source to fix this issue. Here's an example of how we did it for CONTAINS_SUBSTR which is missing from google/zetasql. https://github.com/goccy/go-zetasqlite/pull/209
Thanks, I didn't know ANY_VALUE. I will try using it !
I've released a fix for this in the Recidiviz fork of the emulator - version v0.6.6-recdiviz.2
https://github.com/Recidiviz/bigquery-emulator/releases/tag/v0.6.6-recidiviz.2