Skip to content

Conversation

@tlm365
Copy link
Contributor

@tlm365 tlm365 commented Aug 13, 2024

Which issue does this PR close?

Closes #11914 and part of #11790.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the functions Changes to functions implementation label Aug 13, 2024
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Aug 13, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you very much @tlm365 -- this is a very nice first contribution 🏅

Ok(Arc::new(result) as ArrayRef)
}

fn repeat_common(string: Option<&str>, number: Option<i64>) -> Option<String> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you could make this perform much better by avoiding the String and instead building the output directly with StringViewBuilder

https://docs.rs/arrow/latest/arrow/array/type.StringViewBuilder.html

here is an example of how to use them: apache/arrow-rs#6240

I realize this just follows the same model as was here. However, if we are messing with the code it might be nice to make it faster while we are at it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alamb thanks so much for reviewing. I will take a look!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you -- I filed #11990 to track the idea

@alamb
Copy link
Contributor

alamb commented Aug 14, 2024

I took the liberty of merging up from main and running cargo fmt on this PR

@alamb alamb merged commit f98f8a9 into apache:main Aug 14, 2024
@tlm365 tlm365 deleted the utf8view-repeat branch August 21, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update REPEAT scalar function to support Utf8View

2 participants