-
Notifications
You must be signed in to change notification settings - Fork 1
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
Performance: Add links to downsampling tutorials #45
Conversation
4ce425b
to
ecc7cb4
Compare
ecc7cb4
to
aa86952
Compare
docs/performance/selects.rst
Outdated
WITH downsampleddata AS | ||
( SELECT lttb_with_parallel_arrays( | ||
array(SELECT n FROM demo ORDER BY n), | ||
array(SELECT reading FROM demo ORDER BY n) | ||
,100) AS lttb) | ||
SELECT unnest(lttb['0']) as n, unnest(lttb['1']) AS reading | ||
FROM downsampleddata; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hammerhead: This SQL statement probably also has a formatting hiccup, like #41 (review)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we finally employ a proper SQL linter / formatter for all the technical writing endeavours?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reformatted using https://sqlformat.org/, then edited manually a bit. Is it a good choice?
WITH downsampleddata AS | |
( SELECT lttb_with_parallel_arrays( | |
array(SELECT n FROM demo ORDER BY n), | |
array(SELECT reading FROM demo ORDER BY n) | |
,100) AS lttb) | |
SELECT unnest(lttb['0']) as n, unnest(lttb['1']) AS reading | |
FROM downsampleddata; | |
WITH downsampleddata AS | |
(SELECT lttb_with_parallel_arrays( | |
array(SELECT n FROM demo ORDER BY n), | |
array(SELECT reading FROM demo ORDER BY n), 100) AS lttb) | |
SELECT unnest(lttb['0']) AS n, | |
unnest(lttb['1']) AS reading | |
FROM downsampleddata; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to have a standard formatting tool that we can agree on. Like (at least in our team) we settled on black for Python, and it's considered the truth™️ that we all stick to. Without the "then edited manually a bit" part you mentioned, as that kind of defeats the purpose.
For community posts, I don't dare to be the one nit-picking on formatting all the time, but as soon as we are talking about the main documentation, there needs to be a consistent style and quality of formatting. With formatting being such a subjective topic, only a tool we all abide to can do that job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we need to level up. Future improvements, also expanding into cratedb-examples, will/should/may probably include:
- Using
ruff
across the board. - Use
black[jupyter]
for canonicalizing all the Jupyter Notebooks we introduced recently. - For prose, we are already using Vale and proselint.
- More potential linters: https://markuplint.dev/, https://textlint.github.io/
- For other file formats, https://github.com/super-linter/super-linter has been probed at https://github.com/crate/infrastructure/pull/2688.
- For SQL, the formatter at https://sqlformat.org/ is actually from sqlparse, which we are already using at other places.
=> We probably want to break this out into a different discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've diverted this into another issue. Thanks.
ad904aa
to
6287e91
Compare
59fde48
to
4bfe4bb
Compare
This is relevant content for improving SELECT performance.
This is relevant content for improving SELECT performance.
6287e91
to
e9a0c9a
Compare
About
Add two more references to tutorials on the community forum. Thanks, @hlcianfagna and @hammerhead.
Preview
/cc @surister, @karynzv, @marijaselakovic, @seut, @wierdvanderhaar