Skip to content

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 Changes to functions implementation 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 ❤️

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
@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 Changes to functions implementation 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