Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Discussion: Supporting analytics functions #4735

Open
sebastian opened this issue Sep 29, 2020 · 2 comments
Open

Discussion: Supporting analytics functions #4735

sebastian opened this issue Sep 29, 2020 · 2 comments

Comments

@sebastian
Copy link
Member

Telefonica has repeatedly expressed that they would love support for analytics functions.
In particular rank and rownum. They now also have a concrete use case for LISTAGG.

As Cristian points out on Slack LISTAGG in particular seems safe if run in a restricted per-user query.

It would be great to be able to support analytics functions more widely. Doing this should be:

  • done cautiously so we don't need to backtrack
  • done with a product plan in mind so it's a cohesive and strategic inclusion

We also need to evaluate whether we can support analytics functions only in restricted queries, or whether they could also be supported in an anonymizing context.

Besides the fact that analytics functions requires implementation effort in the parser and compiler, we also have to deeply think through to what extent they allow an analyst to slice and dice data in ways that could circumvent our restrictions. For example: a rownum partitioned by the user which is then subsequently used in a WHERE-clause (for example WHERE rownum = 1) would circumvent our restriction of preventing LIMIT 1 in a restricted query context. I am sure there are countless other such instances too that we need to be aware of.


This issue is mostly meant as a place to discuss and collect thoughts. For concrete subsequent implementations additional issues will follow.

@sebastian sebastian added this to the Release 20.4 milestone Oct 29, 2020
@cristianberneanu
Copy link
Member

rank and rownum will be hard to support, without even considering the anonymization implications.
But adding support for a stringagg function that concatenates input values in an ordered way should be straight forward. We should start with that.

@sebastian
Copy link
Member Author

No additional analytics functions will be added to Evergreen

@sebastian sebastian removed this from the Insights Evergreen milestone Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants