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

Implement native support StringView for find in set #11970

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

PsiACE
Copy link
Member

@PsiACE PsiACE commented Aug 13, 2024

Which issue does this PR close?

Closes #11954 .

Rationale for this change

Ref: https://github.com/apache/datafusion/blob/main/datafusion/functions/src/unicode/character_length.rs

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 labels 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.

Thanks @PsiACE -- I think we should consider a short test that actually invokes the function but otherwise looks great to me ❤️

@@ -913,7 +913,7 @@ EXPLAIN SELECT
FROM test;
----
logical_plan
01)Projection: find_in_set(CAST(test.column1_utf8view AS Utf8), Utf8("a,b,c,d")) AS c
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 we should probably add a test that actually invokes find_in_set with a StringVieAwArray argument.

However, I think @2010YOUY01 has some ideas on a more general testing framework, so maybe this is good enough for now. Let me know what you think

#11790 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add some sqllogictests to make sure it is covered.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done! 5d5a4e6

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 again @PsiACE

@alamb alamb merged commit 10fe3c1 into apache:main Aug 14, 2024
24 checks passed
@PsiACE PsiACE deleted the find-in-set branch August 14, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update FIND_IN_SET scalar function to support Utf8View
2 participants