Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample the first row from a window pane #162

Open
laysakura opened this issue May 25, 2022 · 0 comments
Open

Sample the first row from a window pane #162

laysakura opened this issue May 25, 2022 · 0 comments
Labels
feat New feature or request

Comments

@laysakura
Copy link
Contributor

laysakura commented May 25, 2022

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Use DISTINCT ON operator with ORDER BY clause.

https://stackoverflow.com/questions/3800551/select-first-row-in-each-group-by-group/7630564#7630564

Describe alternatives you've considered

  • WITH clause
  • sub query

https://stackoverflow.com/questions/3800551/select-first-row-in-each-group-by-group/3800572#3800572

Additional context

Want "initial row from 100ms window" (100ms sampling).

Current sampling example is not good in that it can only take aggregated column values.

https://github.com/SpringQL/SpringQL/blob/main/springql-core/tests/e2e_sampling.rs#L86-L87

@laysakura laysakura added the feat New feature or request label May 25, 2022
@laysakura laysakura changed the title Sample a row from a window pane Sample the first row from a window pane May 25, 2022
@laysakura laysakura removed this from the for CAN data processing apps milestone Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant