Skip to content

Conversation

@Lordworms
Copy link
Contributor

Which issue does this PR close?

Closes #11950

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 sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Aug 14, 2024
@Lordworms
Copy link
Contributor Author

an unrelated ci fail

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.

Thanks @Lordworms -- I left some suggestions but I also think this PR could be merged in as is. Love to see the code 🚋 carrying on

Ok(Some(split_string[index]))
} else {
Ok(Some(""))
match (args[0].data_type(), args[1].data_type()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

split_part is one of the functions where we could actually use StringViewArray to speed up its implementation (by avoiding a string copy). This function as written will copy the parts along

It might be a fun optimization project to try as a follow on

}
}

macro_rules! process_split_part {
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW I think we could make this macro a generic function with ArrayAccessor like in this pR from @PsiACE #11974

@alamb alamb merged commit c1fb989 into apache:main Aug 15, 2024
@alamb
Copy link
Contributor

alamb commented Aug 15, 2024

Thanks again @Lordworms

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 SPLIT_PART scalar function to support Utf8View

2 participants