-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automate testing / ensuring that string functions get the same answer for String, LargeString, StringView, DictionaryString, etc #12415
Comments
take |
I plan to create a directory to collect all the string-related tests. The structure would like
The purpose of each file:
The original test case in
|
Thank you @goldmedal . Thank you so much. Note that @2010YOUY01 did an initial version with one function here: #12433 I suggest we try and follow the same model with some other functions and see how it goes |
Thanks for the suggestion. I think my idea is similar to his. The difference is that I tried to group the test cases by data type instead of by function. I'm not sure which one is better. Maybe by function to implement tests is more simple 🤔 |
Move the TODO list here: Some TODO items should be finished in the follow-up PR
|
I think @goldmedal has basically completed this epic -- and we should close it -- is that the case ? |
Yes, the testing framework has been finished. Other function tests can be enhanced by the related issue. Let's close this issue. |
Is your feature request related to a problem or challenge?
@2010YOUY01 found a bug where
substr
behaved differently for StringView than for String: #12383As we continue to implement special versions of the string functions for different representations this drift may get worse
Describe the solution you'd like
I would like a systematic and SQL level set of tests that ensure the string functions compute the same answer for all different combinations.
Describe alternatives you've considered
I think we could do this in sqllogictest by separating the table definitions into different .slt files and then includeing the same queries file. Here is an example:
https://github.com/apache/datafusion/blob/02eab80cd62e02fcb68dee8b99d63aaac680a66c/datafusion/sqllogictest/test_files/join_disable_repartition_joins.slt#L26-L25
So this would look something like
in
strings_stringview.slt
strings_stringview.slt
defines the table with appropriate type. Note there would be similar files for string and largestringin
strings_queries.slt
Additional context
No response
The text was updated successfully, but these errors were encountered: