Reorgnize the StringView tests in sqllogictests#12572
Conversation
| ################################################ | ||
| # Test for Dictionary String concatenation | ||
| ################################################ | ||
|
|
||
| # || same type (column1 has null, so also tests NULL || NULL) | ||
| # expect all results to be the same for each row as they all have the same values | ||
| query T | ||
| SELECT | ||
| column1_dict || column1_dict | ||
| FROM test; |
There was a problem hiding this comment.
I tried to create a dictionary_stirng.slt for them. However, I found that the output type of Dictionary String differs from the normal string. It leads the schema assertion to fail.
External error: query columns mismatch:
[SQL] SELECT ascii_1, ascii_2, unicode_1, unicode_2 FROM test_basic_operator
[Expected] [T][T][T][T]
[Actual ] [?][?][?][?]
at test_files/string/./string_query.slt.part:23
at test_files/string/dictionary_string.slt:40
I think we should avoid returning the testing data directly to avoid this error. Maybe we can do it in another PR.
There was a problem hiding this comment.
I do think this would be a good thing to include in a separate PR -- it is strange to have the Dictionary tests in a file called string_view.slt
alamb
left a comment
There was a problem hiding this comment.
Thank you very much @goldmedal
| statement ok | ||
| drop table test_lowercase | ||
|
|
||
| # Ensure string functions use native StringView implementation |
| ################################################ | ||
| # Test for Dictionary String concatenation | ||
| ################################################ | ||
|
|
||
| # || same type (column1 has null, so also tests NULL || NULL) | ||
| # expect all results to be the same for each row as they all have the same values | ||
| query T | ||
| SELECT | ||
| column1_dict || column1_dict | ||
| FROM test; |
There was a problem hiding this comment.
I do think this would be a good thing to include in a separate PR -- it is strange to have the Dictionary tests in a file called string_view.slt
|
🚀 |
|
Thanks again @goldmedal -- this is a really important help to the project for testing |
|
Thanks @alamb 👍 |
* move the string function tests * move the operator test * add back the test for dictionary string
Which issue does this PR close?
Part of #12415
Rationale for this change
It's the follow-up PR of #12525. The main purpose of this PR is to remove the original
string_view.slt. Some string function tests won't be covered by this PR.See #12415 (comment) for the remaining works.
What changes are included in this PR?
Move the function tests to
string/string_query.slt.partand remove thestring_view.slt.Are these changes tested?
It's a refactor for string tests.
Are there any user-facing changes?
no