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

largest triangle three buckets #885

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

yl-lisen
Copy link
Collaborator

New function

largest_triangle_three_buckets(x, y, n)

Arguments

x — x coordinate. [integer, float, decimal , date, date32, datetime, datetime64]

y — y coordinate. [integer, float, decimal , date, date32, datetime, datetime64]
NaNs are ignored in the provided series, meaning that any NaN values will be excluded from the analysis. This ensures that the function operates only on valid numerical data.

n — number of points in the resulting series. [uint64]

Closed #884

* Add aggregation function for Largest-Triangle-Three-Buckets (#53145)

* Added a simple lttb aggregate function

* Added support for multiple datatypes

* Added support for Date and Date32, updated LTTBData struct

* Updated code to handle bucket size 0 and 1

* Added sort for LTTBData

* Added tests and documentation

* Added some code style fixes

* Added function to new func ref file

* Removed function from new func ref file

* Apply suggestions from code review

* Updated unit tests

* updated LTTB data code

* Minor style fixes

* Updated code with std sort

* updated tests

* Renamed lttb to largestTriangleThreeBuckets

* Added alias lttb

---------

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>

* ClickHouse/ClickHouse#56350 (partial)

* fix: split lttb bucket strategy, first bucket and last bucket should only contain single point (#57003)

* fix: split lttb bucket policy, first bucket and last bucket should only
contain single point

* add comments and modify the corresponding query test

* style: update code format

* style: remove useless comments

* feat: add lttb bucket size test

* fix: typo, duplicate sql

* Merge pull request #62646 from Algunenano/i_like_triangles

Fix crash in largestTriangleThreeBuckets

* ClickHouse/ClickHouse#60469 (partial)

* ClickHouse/ClickHouse#68135 (partial)

* Merge pull request #73172 from ucasfl/fix-ubsan

Fix UBSAN in largestTriangleThreeBuckets

* fixes
@yl-lisen yl-lisen self-assigned this Dec 21, 2024
@yl-lisen yl-lisen merged commit bd43faf into develop Dec 21, 2024
21 checks passed
@yl-lisen yl-lisen deleted the feature/issue-884-largest_triangle_three_buckets branch December 21, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

largest_triangle_three_buckets support
2 participants