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

sql: fix internal error when calling ts_rank with array longer than 4 #99392

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

rytaft
Copy link
Collaborator

@rytaft rytaft commented Mar 23, 2023

Prior to this commit, an internal error could occur when an array longer than length 4 was passed to ts_rank. This commit fixes the error by truncating the array to length 4.

Fixes #99334

Release note: None

@rytaft rytaft requested review from jordanlewis, a team and michae2 March 23, 2023 16:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft rytaft added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Mar 23, 2023
Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Collaborator Author

@rytaft rytaft left a comment

Choose a reason for hiding this comment

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

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2)

@craig
Copy link
Contributor

craig bot commented Mar 23, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@craig
Copy link
Contributor

craig bot commented Mar 23, 2023

GitHub status checks took too long to complete, so bors is giving up. You can adjust bors configuration to have it wait longer if you like.

@rytaft
Copy link
Collaborator Author

rytaft commented Mar 23, 2023

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 23, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

Prior to this commit, an internal error could occur when an array longer
than length 4 was passed to ts_rank. This commit fixes the error by truncating
the array to length 4.

Fixes cockroachdb#99334

Release note: None
Copy link
Collaborator Author

@rytaft rytaft left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @michae2)

@rytaft
Copy link
Collaborator Author

rytaft commented Mar 23, 2023

bors r+

@craig
Copy link
Contributor

craig bot commented Mar 23, 2023

Build succeeded:

@blathers-crl
Copy link

blathers-crl bot commented Mar 23, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


Backport to branch 23.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

roachtest: ts_rank causes internal error: runtime error: index out of range [4] with length 4
3 participants