Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Apr 11, 2025

This PR implements the NTILE() SQL function, which groups rows into evenly sized buckets.

mysql docs: https://dev.mysql.com/doc/refman/8.4/en/window-function-descriptions.html#function_ntile
fixes: dolthub/dolt#9087

Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

if err != nil {
return err
}
numBucketsVal, _, err = types.Int64.Convert(ctx, numBucketsVal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could cache

@jycor jycor merged commit 0ea55bd into main Apr 12, 2025
8 checks passed
@jycor jycor deleted the james/ntile branch April 12, 2025 04:33
samjewell added a commit to samjewell/docs that referenced this pull request Apr 15, 2025
jycor pushed a commit to samjewell/docs that referenced this pull request Apr 15, 2025
jycor pushed a commit to samjewell/docs that referenced this pull request Apr 15, 2025
jycor pushed a commit to dolthub/docs that referenced this pull request Apr 15, 2025
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.

Request for NTILE function

3 participants